one car moving on a straight road covers 1/3 of the distance with 20kmph and the rest with 60kmph find th average speed

Let the total length travelled be L.

Time to travel first L/3 = L/(20*3) = L/60 hour
Time to travel last 2L/3 = (2L/3)/60 = L/90 hour
Average speed = L/[L/60 + L/90]
= L/[5L/180] = 180/5 = 36 km/h