Speed of car A = 32 km per hour
Distance covered by car A in 1 hour
= 32 km
Distance covered by car A in 2 hours
= 32 km + 32 km
= 64 km
Distance covered by car A in 3 hours
= 32 km + 32 km + 32 km
= 96 km
Similarly,
Speed of car B = 35 km per hour
Distance covered by car B in 1 hour
= 35 km
Distance covered by car B in 2 hours
= 35 km + 35 km
= 70 km
Distance covered by car B in 3 hours
= 35 km + 35 km + 35 km
= 105 km
So, Distance car B is ahead of car A
= 105 km - 96 km
= 9 km