You should remember the equation that relates the distance, speed and time such that:
`d = s*t => t = d/s`
d represents the distance, s represents the speed and t represets the time.
The problem provides the distances travelled by Katy and Joe in the same time such that:
`t = 180/s_1 = 120/s_2`
`s_1` represents the Katy's speed and `s_2 ` represents Joe's speed
Notice that the problem provides a relation between the Joe's speed nd Katy's speed such that:
`s_1= s_2 + 20`
`180/(s_2 + 20) = 120/s_2 => 120(s_2 + 20) = 180s_2`
`120s_2 + 2400 = 180s_2 => 2400 = 180s_2 - 120s_2`
`60s_2=2400 => s_2 = 240/6 => s_2 = 40 mph`
Since `s_2` represents the Joe's speed, you may find Katy's speed such that:
`s_1 = s_2 + 20 => s_1 = 40+20 = 60 mph`
Hence, evaluating the Joe's speed and Katy's speed yields 40 mph and 60 mph.