3 Dimensional Geometry {sphere and planes} 
I was solving some question when I came across by this one.
we have a S: $x^2+y^2+z^2+-4x+2y-4=0$ and a line 
$$
D: \begin{cases}
x=-1+6t   \\[2ex]
y=6-5t\\[2ex]
z=1-2t
\end{cases}
$$
I need to write equation of $P_1 ,P_2$ Tangent Surface of the sphere and pass through D.

I firstly rewrite the sphere equation to be $(x-2)^2+(y+1)^2+z^2=9$  
And we know $\vec{U_D}(6,-5,-2)$ is in the plane.
 distance(c,$P_1$)=3 ==> $P_1 : a_1x+b_1y+c_1z+d=0$ $$\frac{|2a-b+d|}{\sqrt{a^2+b^2+c^2}}=3$$
Here Where I stopped I tried to found the equation from the line but that gives me nothing>
Any hint will be very good.thanks much
 A: First, write the equation of a plane $P$ whose normal is the line $D$ and passes through the center of the sphere $O(2,-1,0)$:
$$P:6(x-2)-5(y+1)-2z=0$$
note that the normal vector, $(6,-5,-2)$ is simply the coefficients of $t$ in the equation of line. This plane intersects the line at point $A$, which is
$$6x-5y-2z=17\implies t=\frac{11}{13}\longrightarrow A=(53,23,-9)/13$$
Consider a circle in plane $P$ centered at $O$ with radius $3$. The two tangent lines to this circle passing through $A$ meet the circle at $X$ and $Y$. Hence $OX$ and $OY$ are the vectors perpendicular to the planes you want to find.
The equation of all lines on $P$ passing through $A$ is:
$$\begin{align}
x&=53/13+mt\\y&=23/13+nt\\z&=-9/13+t\\6m-5n-2&=0\end{align}$$
From this set, two lines are tangent to the sphere; hence their distance from $O$ is $3$. So by solving these equations
$$\begin{align}(\frac{53}{13}+mt-2)^2+(\frac{23}{13}+nt+1)^2+(-\frac 9{13}+t)^2&=9\\6m-5n-2&=0\\(mt-2)^2+(nt+1)^2+t^2&=9
\end{align}$$
You will find the points $X$ and $Y$. Solving those yields:
$$t=\frac {15575\pm 31 \sqrt{1746199}}{26676}$$
and $m,n$ are found consequently. The points $X,Y$ are located at $(mt,nt,t)$.
