Problems on Trains
Problems based on trains are same as the problems related to 'Speed, Time and Distance' and some concepts to 'Speed, Time and Distance' are also applicable to these problems. The only difference is that the length of the moving object (train) is taken into consideration in these types of problems.
IMPORTANT FACTS AND FORMULAE

km/hr to m/s conversion:
a km/hr = a x 5 m/s. 18 
m/s to km/hr conversion:
a m/s = a x 18 km/hr. 5 
Time taken by a train of length l metres to pass a pole or standing man or a signal post is equal to the time taken by the train to cover l metres.

Time taken by a train of length l metres to pass a stationery object of length b metres is the time taken by the train to cover (l + b) metres.

Suppose two trains or two objects bodies are moving in the same direction at u m/s and v m/s, where u > v, then their relative speed is = (u  v) m/s.

Suppose two trains or two objects bodies are moving in opposite directions at u m/s and v m/s, then their relative speed is = (u + v) m/s.

If two trains of length a metres and b metres are moving in opposite directions at u m/s and v m/s, then:
The time taken by the trains to cross each other :
(a + b) sec. (u + v) 
If two trains of length a metres and b metres are moving in the same direction at u m/s and v m/s, then:
The time taken by the faster train to cross the slower train :
(a + b) sec. (u  v) 
If two trains (or bodies) start at the same time from points A and B towards each other and after crossing they take a and b sec in reaching B and A respectively, then:
(A's speed) : (B's speed) = (b : a)
TIPS on cracking Aptitude Questions on Problems on Trains
Tip #1: Understand the concepts involved in a train crossing a pole or a platform
1. Time taken by a train of length L to pass a pole or standing man or a signal post is equal to the time taken by the train to cover distance L.
2. Time taken by a train of length L to pass a station of length b is the time taken by the train to cover the distance (L + b).
Question: A train running at the speed of 60 km/hr crosses a pole in 9 seconds. What is the length of the train?
Solution:
Time taken to cross a pole = time taken to cover distance equal to its own length.
Speed of the train in m/s = 60 x 5 / 18 = (50/3) m/s.
Length of the train = Speed of the train x Time taken to cross the pole
= 50/3 x 9
= Length of the train = 150m.
Question: A train passes a station platform in 36 sec and a man standing on the platform in 20 sec. If the speed of the train is 54 km/hr, what is the length of the platform?
Solution:
Speed of the train in m/s = 54 x 5 / 18 = 15m/s.
Length of the train = 15 x 20 = 300m.
Distance traveled in 36s = 15 x 36 = 540m. (This is the length of the train + platform combined)
Length of the platform = (540 – 200) m = 240m.
Tip #2: For problems on 2 trains, use the concept of relative velocity
1. If two trains of length a and b are moving in opposite directions at u m/s and v m/s, then time taken by the trains to cross each other = (a + b) / (u + v).
2. If two trains of length a and b are moving in the same direction at u m/s and v m/s, then time taken by the faster train to cross the slower train = (a + b) / (u  v) .
Question: 2 trains of length 137 m and 163 m are running towards each other and speeds 42 km/hr and 48 km/hr respectively. In what time will the two trains cross each other?
Solution:
Relative velocity = 42 + 48 = 90 km/hr = (90 x 5/18) m/s = 25 m/s. (Opposite directions)
Time taken to cross each other = 300 / 25 = 12 sec.
Question: 2 trains running in opposite directions cross a man standing on the platform in 27s and 17s respectively and they cross each other in 23s. Find the ratio of their speeds.
Solution:
Let the speeds be x m/s and y m/s respectively.
Then, length of 1^{st} train = 27x and that of 2^{nd} train = 17y.
Time taken to cross each other = (27x + 17y) / (x + y) = 23.
= 27x + 17y = 23x + 23y.
= 4x = 6y.
= x: y = 3 : 2.