Two trains each of length 250 m start at the same time on two parallel tracks from point A and point B and approached each other with speed of 36 km/hr and 44 km/hr respectively. When they crossed each other, it was found that one train has moved 40 km more than the other. The distance between A and B is: