Wo trains A and B of length 400 m each are moving on two parallel tracks

Two trains A and B of length 400 m each are moving on two parallel tracks with a uniform speed of 72 km/ h in the same direction with A ahead of B. The driver of B decides to overtake A and accelerates by 1m${{s}^{-2}}$. If after 50 s, the guard of B just brushes past the driver of A, what was the original distance between them?