I'm not sure there is an easy solution. You could look into steering behaviors as used in boids for a possible solution.
You could also take digitalsoapbox's idea to detect what's around the car and then use a state machine to decide what the car will do.
Like if it is clear in front of the car have it accelerate and drive in the best path.
If a car is in the way, have the car try to steer around the other. If the other car then slows then have the first car stop overtaking and move to the best path.
Basically look at what's around the car moment by moment and have states like "overtake" for maneuvers that take longer. It can get as complex as you want.