Let the speed of the slower train = R
Let the rate of the faster train = R + 10
Let the whole distance = D
Then in the first situation :
The time it takes the faster train to cover the whole distance plus 1 hour =
The time it takes the slower train to cover the whole distance - 160 km
And in the second situation :
The time it takes the faster train to cover the whole distance plus 2 hours =
The time it takes the slower train to cover the whole distance - 160 km
So we have this system
D / (R +10) - 1 = ( D - 160) / R
D / (R + 10) - 2 = (D -120) / R
Solving this for D , R we get that
D = 1000km
R = 40 km/hr
R + 10 = 50 km/hr = the rate of the faster train