Let the velocity of car 1 and car 2 be `V_1` and `V_2`, respectively.
Apparent frequencies of sound emitted by car 1 and car 2 as detected at end point are
`f_1=f_0(V)/(V-V_1)`,`f_2=f_0(V)/(V_V_2)`
`330=300(330)/(330-V_1)`,`360=300(330)/(330-V_2)`
`V_1=30(m)/(s)` and `V_2=55(m)/(s)`
The distance between both the cars just when the car 2 reaches end point B (as shown in fig) is