A train 100 m long travelling at 40 ms-1 starts overtaking another train 200 m long travelling at 30 ms-1. The time taken by the first train to pass the second train completely is
Relative velocity of overtaking = 40 - 30 = 10 ms-1. Total relative distance covered with this relative velocity during
overtaking = 100 + 200 = 300 m
So time taken = 300/10 = 30 s