A and B go cycling in the same direction with speeds of 6 km /hr and 12 km/hr. A car from behind passes them in 9 and 10 seconds respectively . What is the speeds of the car?