To avoid cumbersome subscripts, let's instead denote the coordinates of vertices $P_1$, $R$, and $P_2$ by $(a,b)$, $(c,d)$, and $(e,f)$ respectively.
For $\Delta P_1P_2R$ to be a right triangle with $P_1R$ as the hypotenuse, segments $P_1P_2$ and $P_2R$ must be perpendicular to each other. This means that their slopes must be negative reciprocals of each other, i.e. $\big(\frac{f-b}{e-a}\big)\big(\frac{f-d}{e-c}\big)=-1$. Multiplying the numerators gives $f^2-df-bf+bd$. Likewise, multiplying the denominators gives $e^2-ce-ae+ac$. Hence, $e^2-ce-ae+ac+f^2-df-bf+bd=0$. Moving the $ac$ and $bd$ terms to the right, we get $e^2-ce-ae+f^2-df-bf=-ac-bd$. Combining like terms on the left, we get $e^2-(a+c)e+f^2-(b+d)f=-ac-bd$. Finally, by completing the square, we get $\big(e-\frac{a+c}{2}\big)^2+\big(f-\frac{b+d}{2}\big)^2=\big(\frac{a+c}{2}\big)^2+\big(\frac{b+d}{2}\big)^2-ac-bd$. This is the equation of a circle with center $\big(\frac{a+c}{2},\frac{b+d}{2}\big)$ and radius $\sqrt{\big(\frac{a+c}{2}\big)^2+\big(\frac{b+d}{2}\big)^2-ac-bd}$. Any point on that circle other than $P_1$ and $R$ could be vertex $P_2$.