The points A=(3,7) and B=(15,2) together with C=(3,2) form a right triangle

with the segment AB forming the hypotenuse (sketch this out on paper

and you will see what is going on more clearly).

The length of AC is 5, and of BC is 12, so by Pythagoras's theorem:

AB^2 = 5^2 + 12^2 = 169,

so AB=sqrt(169) = 13.

Now that was the long way of doing it. If you look closly at what I did

you will see that the distance between any two points A=(a_1, a_2)

and B=(b_1, b_2) is:

d(A,B) = sqrt[(a_1-b_1)^2 + (a_2-b_2)^2].

RonL