let s1 and s2 be the distance covered by the two buses
s1 + s2 = 350 ................................eqn I
velocity (v) = distance (s)/time (t) .........................eqn II
from eqn II the velocity of the first bus, v1 = s1/t1
s1 = v1t1 .................................eqn III
velocity of the second bus, v2 = s2/t2
s2 = v2t2 ...........................eqn IV
substitute eqn III and eqn IV into eqn I
v1t1 + v2t2 = 350
the time taken for any two moving objects to simultaneously cover any distance is equal. Thus,
t1 = t2 = t
eqn V becomes
v1t + v2t = 350
t(v1 + v2) = 350
v1 = 40
v2 = 60
t(40 + 60) = 350
100t = 350
divide both sides by 100
100t/100 = 350/100
t = 3.5 hours