He worked 39 hours in 1 week. Dividing $730 by $18 gives a decimal value therefore you have to start by multiplying $18 by 35 hours.
1. $18/hour x 35 hours = $630
2. $730 - $630 = $100.
3. There are no combinations of $18 and $25 that can come together to form $100 therefore there must have been 4 hours of overtime worked ($100 /$25 = 4)
4. 35 hours + 4 hours = 39 hours
Hope this helped