Let the first speed of the train be x km/h.
∴ Time taken to cover 54 km = h
New speed of the train = (x + 6) km/h
∴ Time taken to cover 63 km = h
According to the given condition,
Time taken to cover 54 km + Time taken to cover 63 km = 3 h
∴ x = 36 (Speed cannot be negative)
Hence, the first speed of the train is 36 km/h.