Question 353818
Let the speed of bus =  X m/s and  the speed of train = Y m/s 

where Y > X
 
speed of train is greater than bus because train passes the boy.


Let the length of train = L

relative velocity when both in opposite direction = X + Y  meter/second

  relative velocity when both in same direction  =  Y - X  meter/second

according to question   L /(X + Y) = 5 OR, L = 5(X+Y)......(1)

 and  L /(Y-X) = 45  OR,  L = 45(Y-X) ......(2)

from above 2 equations....

 5(X+Y) = 45(Y-X)

=> 5X + 5Y = 45 Y - 45 X

=> 50 X = 40 Y

=>   X / Y =  4/5


so, speed of bus and train are in ratio 4:5 .


Sometimes there may be typing mistake in solution of a problem, so please ignore it. Understand the concept and try to solve the problem yourself. If there is problem related to concept, contact at 
 sudhanshu.cochin@gmail.com
Best of luck.......