Assume that the train is moving from left to right in
the drawing above.
The front of the train begins at B and must travel to D.
So the front of the train travels the distance of BD in
order for the entire train to be completely out of the
tunnel.
BD = BC + CD = 325 + 575 = 900 meters.
[Note that you could also do it by saying that the end
of the train begins at A and must travel to C.
So the end of the train travels the distance of AC in
order to be completely out of the tunnel.
AC = AB + BC = 575 + 325 = 900 meters.]
The Distance is 900 meters and the Time = 90 seconds
Edwin