Given distance=360km. Let the speed of the train be x km/hr. Speed when increased by 5 km/hr = (x+5) km/hr
360/x - 360/(x+5) = 1
[360(x+5) - 360x]/x(x+5) = 1
x² + 5x - 1800 = 0
x² + 45x - 40x - 1800 = 0
x(x+45) - 40(x+45) = 0
(x-40)(x+45) = 0
x = 40, -45
The speed of the train is 40 km/hr.