Velocity of car A=36 km h-1 = 10 m s-1
Velocity of car B and car C = 54 km h-1 = 15 m s-1
A and B are travelling in the same direction.
A and C are travelling in opposite directions.
The velocity of A w.r.t C is VAC= 25 m s-1.
Time in which A would reach C is t
The velocity of B w.r.t A is VBA= 5 m s-1
Distance between A and B is s= 1000 m
Maximum time in which B has to overtake A=40s
The required acceleration can be therefore calculated using the second equation of motion
B has to have a minimum acceleration of 1 m s-2 to avoid an accident.