Distance between AB: 4(v+2v+2)=4(3v+2)= 12v+8.
(2) If v=40 is substituted into the formula in (1), the distance between AB is 12× 40+8 = 488km.
I hope it helps you.