Where or when the passenger train stops for an hour will not matter. The two trains are consuming the 1250 km distance between them.
TRAIN SPEED TIME DISTANCE
PASSENGER r+30 4 (r+30)(4)
FREIGHT r 5 (r)(5)
Total 1250
Or to three signif. figures,
-----freight train speed
-----passenger train speed