Two trains A and B ,100km apart are travelling towards each other on different tracks with same starting speed of 50km/h. The train A accelerates at 20 km/h^2 and the train B retards at the rate 20 km/h^2. The distance covered by the train A when they cross each other is