Find the equations of the tangent planes to the sphere $x^2+y^2+z^2+2x-4y+6z-7=0,$ which intersect in the line $6x-3y-23=0=3z+2.$ Find the equations of the tangent planes to the sphere $x^2+y^2+z^2+2x-4y+6z-7=0,$ which intersect in the line $6x-3y-23=0=3z+2.$

Let the tangent planes be $A_1x+B_1y+C_1z+D_1=0$ and $A_2x+B_2y+C_2z+D_2=0$
As the line $6x-3y-23=0=3z+2$ lies on both the planes,so put $z=\frac{-2}{3},x=\frac{3y+23}{6}$ in the both equations of the planes,
$A_1\frac{3y+23}{6}+B_1y-\frac{2C_1}{3}+D_1=0$ and $A_2\frac{3y+23}{6}+B_2y-\frac{2C_2}{3}+D_2=0$
I am stuck here.Please help.
The answer given in the book is $2x-y+4z-5=0$ and $4x-2y-z=16.$

Two easy points on the required line are $(0,-\frac{23}{3},-\frac{2}{3}),(\frac{23}{6},0,-\frac{2}{3})$. For these to lie in the plane $Ax+By+Cz+D=0$ we require $23A-4C+6D=0,-46B-4C+6D=0$. Subtracting gives $A=-2B$, and we also have $3D=23B+2C$.
The sphere has equation $(x+1)^2+(y-2)^2+(z+3)^2=21$, so it has centre $(-1,2,-3)$ and radius $\sqrt{21}$. The centre must be a distance $\sqrt{21}$ from the plane, so we have $|-A+2B-3C+D|=\sqrt{21(A^2+B^2+C^2)}$. Substituting the earlier relations for $A,D$ we get $(4B-3C+\frac{23}{3}B+\frac{2}{3}C)^2=21(5B^2+C^2)$, or $7^2(\frac{5}{3}B-\frac{1}{3}C)^2=21(5B^2+C^2)$, and hence $(4B+C)(B-2C)=0$. So $C=\frac{1}{2}B$ or $-4B$.
Thus one plane is $B=2,C=1,A=-4,D=16$ or $4x-2y-z=16$ (note that we can take $B$ to have any non-zero value, it does not affect the equation of the plane). The other plane is $B=1,C=-4,A=-2,D=5$ or $2x-y+4z=5$.
