Given,
Initially both car is at rest, so u1=u2=0
Acceleration of car A&B is {a}_{1}&{a}_{2}
Let us assume,
Time of reach to destination of car A is, t1=t0
Time of reach to destination of car B is, t2=t0+t
Using second equation of motion, we have
u1t+21a1t12=u2t+21a2t22
⇒0×t+21a1t02=0×t+21a2(t0+t)2
⇒a2a1t0=t0+t
⇒t0=a2a1−1t
From first equation of motion, we have
v1=a1t0v2=a2(t0+t)
⇒v=v1−v2=(a1−a2)t0−a2t
⇒v=(a1−a2)a2a1−1t−a2t
⇒v=t(a1−a2a1a2−a1−a2a2a2−a2)
⇒v=t(a1−a2a1a2−a2a1)
⇒v=a1.a2t