if car A is going 40 mph and car B is stationary , how fast would car b have to go to cath up to car A in 4/10 of a mile

s=0.4 miles

s=v(A)•t =>
t= s/v(A)=0.4/40=0.01h.
For the car B:
s=a•t²/2,
v(B)=a•t.

s/v(B) = a•t²/2• a•t=t/2
v(B)=2s/t=2•0.4/0.01=80 mph