Question 311078
Train A speed = 80 mph
Train B 90 mph

Train A is ahead of train B at the station by 40 minutes.( 2/3 hours)

By the time train B reaches the station train A has traveled 80 * 2/3 miles
=160/3 miles to a point say P.

Let the distance from point P to the point where train B overtakes train A be x
.
Train B travels  160/3 + x miles in the same time the train A travels x  miles

time taken by train A = x/80 hours
time taken by train B = x+160/3  / 90
.
x/80 = 3x+160 / 3 divided by 90
x/80 = 3x+160 /3  * 1/90

x/80= 3x+ 160 / 270
270x = 80(3x+160)
270x=240x +12800
30x= 12800
x=426.66 miles

time taken by train A t travel x miles = 426.66/80
=5.33 hours.
This is the same time taken by train B to cross train A