how long will it take a car 3m long moving at 100km/hr to overtake a truck 10m long moving 50km/hr if the car is 10m behind the truck

in time t

truck moves distance d
car moves distance d + 0.01 km
adjust those distances if you have a picture of where the bow and stern of the vehicles are before and after.

d + 0.01 = 100 t
d = 50 t
------------------- subtract
0.01 hr = 50 t
t = 0.01 /50 = 0.0002 hr
0.0002 hr * 3600 seconds / hour = 0.72 seconds