Question 516882
Car A Data
==========
Speed = 40mph
Time = t hour
Distance covered = x miles 
Distance = speed*time
x=40*t
x=40t.............(1) 

Car B Data
==========
Speed = 60mph
Time =t-2(hour)
Distance covered = x
Distance = Speed * time
x=60*(t-2) 

Both cars will cover same distance 
40t=60*(t-2)
40t=60t-120
40t-60t=-120
-20t=-120
-20t/-20=-120/-20
t=6 hours 
Car A travel time 6 hours and Car B travel time 4 hours  to cover  the same distance.
After 4 hours of leaving same place Car B will catch Car A 
Check
======== 
Car A Data
==========
Speed = 40mph
Time = 6 hour
Distance covered = x miles 
Distance = speed*time
x=40*6
x=240 miles 
Car B Data
==========
Speed = 60mph
Time =t-2=6-2= 4(hour)
Distance covered = x
Distance = Speed * time
x=60*4
x=240  miles