Solution:
Given:
Speed of the first train = 65 km/hr
Speed of the second train = 45 km/hr
The faster train crossed a man who is sitting on the slower train in = 18 seconds
Formula:
If the speed of the two trains be x km/hr and y km/hr respectively if x > y.
Relative speed, if directions are = (x + y) km/hr
Relative speed, if same directions = (x - y) km/hr
Speed = Distance/Time
1 km/hr = 5/18 m/s
Calculation:
Relative speed of both trains, if both are running in same direction = (65 - 45) = 20km/hr
Let length of faster train be x m,
According to the question
20 × (5/18) = x/18
⇒ x = 20 × (5/18) × 18
⇒ x = 100 m
∴ Length of the faster train is 100 m.