two trains start from p and q respectively and travel towards each other at a speed of 50 km / hr and 40 km / hr respectively . by the time they meet , the first train has traveled 100 km more than the second . the distance between p and q is ?
a 900 km at the time of meeting , let the distance traveled by the second train be x km . then , distance covered by the first train is ( x + 100 ) km . x / 40 = ( x + 100 ) / 50 50 x = 40 x + 4000 = > x = 400 so , distance between p and q = ( x + x + 100 ) km = 900 km .
add(add(divide(multiply(100, 40), subtract(50, 40)), 100), divide(multiply(100, 40), subtract(50, 40)))