Let the speed of the bus be v kmh-1
Distance covered by one bus before the next one leaves the same town is vT For buses going in the same direction as the cyclist, frequency of the bus is 18 min i.e.,
vT/relative velocity of the bus w.r.t. the cyclist = 18 min
vT/(v - 20) = 18 … (1)
Similarly, for buses going in the opposite direction, frequency of the bus = 6 min
vT/relative velocity of the bus w.r.t. the cyclist = 6 min
vT/(v + 20) = 6 … (2)
(1)/(2)
⇒ (v + 20)/(v - 20)
Substitute for v in (1)
(40 x T)/(40 - 20) = 18
⇒ T = 9 min.