**Solution**:

Let the actual speed of the train be x km/hr and let the actual time taken be y hours.

Distance covered is xy km

If the speed is increased by 6 km/hr, then time of journey is reduced by 4 hoursi.e.,

when speed is(x+6)km/hr, time of journey is(y−4) hours.

∴ Distance covered =(x+6)(y−4)

⇒xy=(x+6)(y−4)

⇒−4x+6y−24=0

⇒−2x+3y−12=0 …………………………….(i)

Similarly xy=(x−6)(y+6)

⇒6x−6y−36=0

⇒x−y−6=0 ………………………………………(ii)

Solving (i) and (ii)

we get x=30 and y=24

Putting the values of x and y in equation (i),

we obtain

Distance =(30×24)km =720km.

Hence, the length of the journey is 720km