ok have alook at this if you are a stationary person standing on the road A to B a bus will pass you in every t sec. so distance travelled by the bus1 before bus2 arrives is Vbt. now you start cycling from A to B and so you have a velocity Vc in the direction from A to B. so busses travelling from A to B will seem to move slower to youi.e they will have a relative velocity of Vb-Vc and hence the same distance Vbt for the cyclist will be covered in T1=Vbt/Vb-Vc for the bus commin in the opposite direction Bt to A it will seem to come faster with a relative velocity of Vb+Vc and so that same distance for the cyclist will be covered in T2=Vbt/Vb+Vc this question is all about relative velocity and vectors correct me if i am wrong or nudge me if you have any doubts