Answer:
4hrs
car b started at 10am
at 10am car a is already at (40×2hrs)=80m
11am:
a- 80+40=120m
b-0+ 60=60m
12am:
a-120+40=160m
b-60+60=120m
1pm:
a-160+40=200m
b-120+60=180m
2pm:
a-200+40=240m
b-180+60=240m
car B caught up with car A at 2pm
so from 10am to 2pm= 4 hrs