Explanation:
Pythagoras for right-angled triangles
c² = a² + b²
c is the Hypotenuse (the baseline, the side opposite of the 90 degree angle). this is the direct connection between the 2 points.
a and b are the other 2 sides (or legs) of the triangle enclosing the 90 degree angle between them.
these 2 sides are the number of x and y units difference between the 2 points : how many units do I have go in x direction, and how many units in y direction to reach the second point ?
so, we could also write the Pythagoras equation like
distance² = (x difference)² + (y difference)²
and since we are squaring everything, we don't care about negative values in the difference calculations.
it is just important that we use the same sequence in the difference calculations for x and y.
so, I suggest we do point 1 minus point 2 :
distance² = (-8 - -1)² + (8 - 2)² = (-7)² + (6)² = 49 + 36 = 85
distance = sqrt(85) = 9.22 (rounded to 2 positions after the decimal point).