You can calculate the shortest distance between two points using the formula above. Basically this will allow you to get the distance between x and y.
There are some online tools that help you to identify what are the shortest distance between two given points.