Let the length of the train be x metres,
Then, the train covers x metres in 8 seconds and (x + 180) metres in 20 sec
x/8=(x+180)/20
20x = 8 (x + 180)
x = 120.
Length of the train = 120 m.
Speed of the train = (120/8) m / sec = m / sec = (15 *18/5) kmph = 54 km