The distance travelled = 360 km.
Let the speed of the train = x kmph.
Time taken to complete a journey = \(\frac{distance}{speed}\)
⇒ x2 + 5x = 1800
⇒ x2 + 5x – 1800 = 0
⇒ x2 + 45x – 40x – 1800 = 0
⇒ x(x + 45) – 40(x + 45) = 0
⇒ (x + 45) (x – 40) = 0
x + 45 = 0 or x -40 = 0
x = -45 or x = +40
But x can’t be negative.
∴ The speed of the train = 40 kmph.