171/9 =342/X
where x is the unknown number of hours.
The proportion expresses the fact that the rate (hourly rate) is the same in both cases.
From the proportion, find
x = 342x9/171= 2*9 = 18 hours. ANSWER
Solved.
Or, if you want, you can solve it MENTALLY, without using equations, at all.
The hourly rate is 171/9 = 19 dollars per hour.
Then your answer simply is 342/19 = 18 hours.