Distance travelled by Ramu = 45 x 4 = 180 km
Somu travelled the same distance in 6 hours.
His speed = 180/6 = 30 km/hr
Hence in the conditional case, Ramu's speed = 45 - 9 = 36 km/hr and Somu's speed = 30 + 10 = 40km/hr.
Therefore travel time of Ramu and Somu would be 5 hours and 4.5 hours respectively.
Hence difference in the time taken = 0.5 hours = 30 minutes.