Given circle S≡x2+y2−10x−14y−51=0, P is (−7,2)
S1=(−7)2+22−10(−7)−14(2)−51=44>0
⇒P lies outside the circle.
Centre, C=(−g,−f)=(5,7)
Radius, r=√g2+f2−c=√25+49+51=√125
CP=√122+52=13
∴d1=CP+r=13+√125
d2=CP−r=13−√125
∴d21+d22=(13+√125)2+(13−√125)2=2(169+125)=588