how do you do distance between two points?
Well you could use the distance formula.
Have a look here.
http://www.mathsisfun.com/algebra/distance-2-points.html