The distance formula is this: #d=sqrt((y_2-y_1)^2+(x_2-x_1)^2)#, where #(x_1,y_1)# are the coordinates of the first point, #(x_2,y_2)# are the coordinate of the second point, and #d# is the distance between the two points.
Let's say #(-1,7)# is the first point, and #(2,12#) is the second point Note that it doesn't matter which one we call the first or second point