posted by Tom .
please explain how you got the answer
car A - 20m/s
car B - 30m/s
Assume that both cars are 5m long. Suppose that car B is 20m behind car A is attempting to overtake car A. How long will it take for car B to arrive 10m ahead of car A?
The length of the cars does not matter, if you define distance behind and distance ahead as the distance between the front ends. You need to clarify the definition.
In order for car B to advance from 20 m behind to 10 m ahead, it must advance 30 m relative to car A. Since the relative speed is 10 m/s, that will require
T = 30 m/ 10 m/s = 3 seconds