Given P(-2, 2), Q(2, 2) and R(2, 7).

If the square of the length of the longest side of a triangle is equal to the sum of the squares of the other two sides, then the triangle is a right triangle.

By distance formula , distance between two points = √[(x_{2}-x_{1})^{2}+(y_{2}-y_{1})^{2}]

PQ = √[(2-(-2))^{2}+(2-2)^{2}]

PQ = √[(4^{2}+0^{2}]

PQ = √16

PQ = 4 …..(i)

QR = √[(2-2)^{2}+(7-2)^{2}]

QR = √[(0)^{2}+(5)^{2}]

QR = √25

QR = 5 …….(ii)

PR = √[(2-(-2))^{2}+(7-2)^{2}]

PR = √[4^{2}+5^{2}]

PR = √16+25

PR = √41…….(iii)

PQ^{2}+QR^{2} = 4^{2}+5^{2}

= 16+25

=41

PR^{2 }= 41

PQ^{2}+QR^{2} = PR^{2}

PQR is a right triangle.

P,Q,R are the vertices of a right angled triangle.