See Fig. The slope of (bar)AB is
-5 - 0/0 - 7 = 5/7
Therefore, the slope of PQ is –7/5. Consider ΔABQ in which QP is the altitude from Q onto AB and AP is the altitude from A onto BQ. These two intersect at P. Hence, BP is the third altitude of ΔABQ. Therefore, BR is perpendicular to AR. Hence, if R = (h, k), then
Slope of BR x Slope of AR = -1
⇒ (k + 5/h)(k/h -7) = -1
⇒ h2 + k2 - 7h + 5k = 0
Therefore, the locus of R(h, k) is
x2 + y2 - 7x + 5y = 0