The "distance formula" is a result of the Pythagorean Theorem:
h^2=x^2+y^2, where h is the hypotenuse of a right triangle and x and y are the side lengths.
The distance formula then becomes:
d^2=((x2-x1)^2+(y2-y1)^2
In this case:
d^2=(-5--9)^2+(-2-1)^2
d^2=4^2+(-3)^2
d^2=16+9
d^2=25
d=√25
d=5 units