Question 853723
The distance travelled by the cars is the same when the second catches up with the first.

Let the first car (A) take x hours for the distance

distance traveled by car A = 40x

Car B takes 2 hours less , (x-2) hours

distance = 60(x-2)

60(x-2)=40x

60x-120=40x

20x=120
x=6 hours

Time taken by car B = (x-2) = 4 hours to catch up