Question 1053007
The graph is not necessarily part of the proof that it is (or it is not) a right triangle, but it makes it easier to visualize the problem and to calculate what it asks for.
It is also requested for you to realize that "not all that glitters is gold",
and a triangle may look lie a right triangle, but not be aright triangle.
Here is a graph showing triangle XYZ,
with another point, named A, added for the sake of the unrequested explanation below.
{{{drawing(300,330,-7,3,-5,6,
grid(1),red(line(-6,-4,2,-2)),
red(line(-6,-4,0,5)),red(line(0,5,2,-2)),
locate(-6.3,-4,X),locate(2.1,-2,Y),
locate(0.1,5.45,Z),locate(2.1,-4,A)
)}}}
 
UNREQUESTED EXPLANATION:
A squared distance is the sum of the squared horizontal and vertical distances,
and that looks awfully complicated when expressed as "the distance formula."
On the graph, we can count squares, and we know that starting from X,
Y is 8 units to the right (from X to A) and 2 units up (from A to Y),
so the Pythagorean theorem applied to right triangle XYA tells us that the distance between X and Y squared is
{{{XY^2=8^2+2^2=64+4=68}}} .
The distance formula tells us that the distance from point {{{X(x[X],y[X])}}} and point {{{Y(x[Y],y[Y])}}} is
{{{XY=sqrt((x[Y]-x[X])^2+(y[Y]-y[X])^2)}}} ,
meaning that 
{{{XY^2=(x[Y]-x[X])^2+(y[Y]-y[X])^2}}} .
Same thing, but made to look more complicated.
 
WHAT IS PROBABLY EXPECTED FOR AN ANSWER:
If squaring and then adding the lengths of two of the sides of a triangle,
we get the square of the length of the other/third side of the triangle,
that triangle is a right triangle.
To find out if XYZ is a right triangle, using the distance formula,
we would calculate the distances {{{XY}}}, {{{YZ}}} , and {{{XZ}}} .
and we would have to prove that if we square and add up two of those distances,
the sum is the square of the other/third distance.
 
Using the distance formula means taking a square root to find the distance,
and since we want to square that distance,
hopefully it  would be acceptable to just use
{{{XY^2=(x[Y]-x[X])^2+(y[Y]-y[X])^2}}}
to find the squared distance directly.
{{{system(XY^2=(2-(-6))^2+(-2-(-4))^2=8^2+2^2=64+4=68,YZ^2=(0-2)^2+(5-(-2))^2=(-2)^2+7^2=4+49=53,XZ^2=(0-(-6))^2+(5-(-4))^2=6^2+9^2=36+81=117)}}}
Adding the two smaller squares we get {{{XY^2+YZ^2=68+53=121}}} ,
which is a bit larger than {{{XZ^2=117}}} ,
so the angle at Y is not a right angle,
It measures a bit less than {{{90^o}}} .