Using the concept of relative velocity
Let us assume the velocity of A w.r.t. B. To do this, we plot the resultant velocity, →VAB
→VAB=→VA−→VB=→VA+(−→VB)
As the accelerations of both the cars is zero, so the relative acceleration between them is also zero. Hence, the relative velocity will remain constant. So the path of A with respect to B will be straight line and along the direction of relative velocity of A with respect to B. The shortest distance between A and B is a perpendicular from B on the line of motion of A with respect to B.
From the figure
tanθ=VBVA=1520=34 ....(i)
This θ is the angle made by the resultant velocity vector |→VAB| with the x-axis.
Also we know that from Fig.
OC=x500=34
From equation (i) and (ii), we get x = 375 m.
∴AB=OB−OC=400−375=25m
But the shortest distance is BP.
From diagram, it is clear that BP=BCcosθ=25×45
∴BP=20m