Two trains P and Q are moving along parallel tracks with same uniform speed of 20ms. The driver of train P decides to overtake train Q and accelerates his train by 1ms2. After 50s, train p crosses the engine of train Q. Find out what was the distance between the two trains initially provided the length of each train is 400m.