Two cars A and B are moving west to east and south to north, respectively, along crossroads. A moves with a speed of 20 m s^-1 and is 500 m away from the point of intersection of cross roads and B moves with a speed of 15 ms^-1 and is 400 m away from the point of intersection of cross roads. Find the shortest distance between them.