If the track is 10km long, and X travels at 40 km/h, it will take 1 hour to do 4 laps. this means that car X will do one lap in 15 minutes. Y travels at 30 km/h, which means it will do 3 laps in 1 hour, meaning that car X will do 1 lap in 20 minutes.