The equation of given circle is x2+y2−6x−2py+17=0
or (x−3)2+(y−p)2=(p2−8) ....(i)
Also (0,0) lies outside the circle.
Equation of director circle of S=0 will be (x−3)2+(y−p)2=2(p2−8) ....(ii)
Tangents drawn from (0,0) to circle (i) are perpendicular to each other. ∴(0,0) must lie on director circle. ∴(0−3)2+(0−p)2=2(p2−8) ⇒p2=25 ⇒p=±5