Trains A and B are moving towards each other on the same track with velocities 40 km/hr and 20 km/hr respectively. A sparrow which can fly at 30 km/hr flies off from train A when the trains are 30 km apart. The sparrow directly moves towards the train 'B' and on reaching there flies back to 'A' and so on. Distance travelled by the sparrow till the two trains will hit, is:
Distance travelled by the sparrow = (30 km /hr) = 15 km