Let the speed of one train =x km/hr
Speed of other train = (x + 5)km/hr
Distance = speed \(\times\) time
Distance covered by one train in 2 hrs = x \(\times\)2 = 2x km
Distance covered by other train in 2 hrs =2(x + 5) = (2x + 10) km
Remaining distance between the train = 30 km
Therefore speed of one train = 75 km/hr
Speed of other train = x + 5 = 75 + 5 = 80 km/hr