two trains running in opposite directions cross a man standing on the platform in 27 seconds and 17 seconds respectively . if they cross each other in 25 seconds , what is the ratio of their speeds ?
"let the speed of the trains be x and y respectively length of train 1 = 27 x length of train 2 = 17 y relative speed = x + y time taken to cross each other = 25 s = ( 27 x + 17 y ) / ( x + y ) = 25 = ( 27 x + 17 y ) / = 25 ( x + y ) = 2 x = 8 y = x / y = 8 / 2 = 4 / 1 i . e 4 : 1 answer : b"
divide(subtract(27, 25), subtract(25, 17))