Constant Travel Rates Rule, RT=D, to relate rate R, time T, distance D.
SPEED TIME DISTANCE
Passengertrain r 3 d
Freighttrain r-20 3+2 d
The description gives enough information to know the times for both trains. Only two unknown variable to solve: Passenger train, r, and the overtake-distance, d.
--------two formulas for d.
The question only asks for r and r-20.