If you have two points (x1, y1) and (x2, y2), the distance between them can be found using the formula:
d = √[ (x2 - x2)² + (y2 - y1)² ] (This is just the Pythagorean Theorem.)
It makes no difference which point you call (x1, y1) and which you call (x2, y2).
If (x1, y1) = (-2, 6) and (x2, y2) = (1, 2), then, by using the formula, you have:
d = √[ (1 - -2)² + (2 - 6)² ] = √[ (3)² + (4)² ] = √[ 9 + 16 ] = √25 = 5.
You can also find the answer by draphing the two points, drawing a right triangle, and using the Pythagorean Theorem.