Sanjay traveled a total distance of 180 km in 9 hours. He covered 30 km at a speed of 15 km/hr, which took him (30 km / 15 km/hr) = 2 hours.
To find the time he traveled at the rate of 18 km/hr, we can subtract the time taken at 15 km/hr from the total time:
Total time - Time at 15 km/hr = Time at 18 km/hr 9 hours - 2 hours = 7 hours
Therefore, Sanjay traveled for 7 hours at a speed of 18 km/hr.