Let x = the hours needed for Wanda to catch up to Hector.
Hector has already completed 18 miles. Hector travels at 12 miles per hour.
After x more hours, Hector will travel
18 + 12x miles
Wanda travels at 16 miles per hour. In x hours, she travels
16x miles
If Wanda catches up to Hector, then
16x = 18 + 12x
4x = 18
x = 4.5 hours
Answer: 4 hours, 30 minutes (or 4.5 hours)