When car B passes car A, they will have traveled the same distance, d.
speed = distance/time
distance = speed * time
Car A travels t time.
Since car B starts an hour later, car B travels t - 1 time.
Car A:
d = st
s = 40t
Car B:
d = st
d = 60(t - 1)
The distance are equal, so
40t = 60(t - 1)
40t = 60t - 60
-20t = -60
t = 3
Car A started at 9 am.
9 am + 3 hours = noon.
Answer: at noon.