Distance = speed x time
Distance travelled by car A when car B started = 60 x 2 = 120 miles
Number of miles remaining at the time car B started = 400 - 120 = 280 miles.
At time of their meeting both cars has travelled a combined distance of 280 miles and has spent the same time.
Let t be the time they travelled together before they meet, then the sum of the distance travelled by car A and car B is 280miles.
60t + 80t = 280
140t = 280
t = 280/140 = 2 hours
After 2 hours car A has travelled a further 60 x 2 = 120 miles and car B has travelled 80 x 2 = 160 miles.
Total distance travelled be car A is 120 + 120 = 240 miles
Midpoint of the journey = 400/2 = 200 miles
Therefre, at the time they met, the were 40 miles from the midpoint and they are close to San Francisco.