When two trains cross each other while moving in the opposite direction or when a train overtakes another train, the distance covered by the express train is equal to the sum of the lengths of both the trains.
Case 1: When the trains travel in opposite directions:
Distance travelled = Sum of lengths of the two trains = Relative speeds of the trains × Time taken
In this case, relative speeds = 72 + 45 = 117 km/hr (Relative speed when two objects travel in opposite directions = Sum of the individual speeds)
Time taken = Half a minute = 30 seconds
As the speed is in km/hr and time is in seconds, let us convert the speed into m/sec to ensure congruency in the units.
117 km/hr =
=
m/sec
Therefore, distance covered = Sum of the lengths of the two trains =
= 975 metres
Case 2: When the trains are travelling in the same direction:
Distance travelled = Sum of the lengths of the two trains = Relative speed × Time taken
Relative speed = (72 - 45) = 27 km/hr (When two objects travel in the same direction, their relative speed is equal to the difference between their individual speeds.)
As the lengths of the two trains will remain the same, irrespective of their direction of travel, the distance travelled will be the same in both the cases = 975 m
Converting 27 km/hr into m/sec, we get
=
m/sec
975 m =
× Time taken (in seconds)
Time taken =
= 130 seconds