Answer:
Ok, at the beginning the distance between the trains is 200km:
IPa(0s) - P(0s)I = 200km.
where Pa is the position of train A, and Pb is the position of train B.
Now, the speed of train A is:
Sa = 50km/h
Sb = 65km/h
Now, remember the relation:
Distance = Speed*time.
So, in one hour, the displacement of train A is:
Distance = 50km/h*1h = 50km
The displacement of train B is:
distance = 65km/h*1h = 65km.
Now, if at the beginning train A is 200km ahead of train B, then we have:
Pa - Pb = (Pa(0s) + 50km) - (Pb(0s) + 65km)
= (Pa(0s) - Pb(0s)) + (50km - 65km) = 200km - 15km = 185km.
Now, if train B was 200km ahead of train A, we have:
Pb - Pa = (Pb(0s) + 65km) - (Pa(0s) - 50km) =
(Pb(0s) - Pa(0s)) + (65km - 50km) = 200km + 15km = 215km