R*T=D
R-rate
T-time
D-distance
They distance will be the same.
40*X = 60*(X-.25)
15 minutes= .25 hours
40X=60X-15
15=20X
X=3/4 hours or 45 minutes
45 minutes after 6:10 am would be 6:55 am
To check it, we can think about it like this:
At 6:55, Train A would have passed the station 45...