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 24 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 = 24 s = ( 27 x + 17 y ) / ( x + y ) = 24 = ( 27 x + 17 y ) / = 24 ( x + y ) = 3 x = 7 y = x / y = 7 / 3 answer : c"
divide(subtract(27, 24), subtract(24, 17))