To find out how many hours the plumber worked, you can divide the total charge by the hourly rate.
Luke was charged $180, and the plumber's rate is $45 per hour:
\[ \text{Hours worked} = \frac{\text{Total charge}}{\text{Hourly rate}} = \frac{180}{45} = 4 \]
So, the plumber worked 4 hours.