A right triangle has sides a^2 + b^2 = c^2. Conversely, if a triangle has sides a^2+b^2=c^2 then it is a right triangle.
So first, find the distance between PQ, QR and RP. Then check to see if any combinations. Does PQ^2 + QR^2 = RP^2, QR^2 +RP^2 = PQ^2 or RP^2 + PQ^2 = QR^2. If so, you have a right triangle.