Correct option is D
Given:
Length of the first train = 100 m
Length of the second train = 80 m
Speed of the first train = 51 m/s
Speed of the second train = 42 m/s
Formula Used:
When two trains are moving in the same direction, the relative speed is calculated by subtracting the speed of the slower train from the speed of the faster train.
Relative Speed = Speed of faster train - Speed of slower train
Time to cross = (Sum of the lengths of both trains) / Relative speed
Solution:
The relative speed.
Relative speed = 51 m/s - 42 m/s = 9 m/s
The total length of both trains.
Total length = 100 m + 80 m = 180 m
Time to cross = Total length / Relative speed
=> Time = 180 m / 9 m/s = 20 seconds
The two trains will cross each other in 20 seconds