How to find a plane that is tangent to two given spheres and passes through a given point

analytic geometrygeometryspheresspherical-geometry

My problem is the following:
Given two spheres: $$(x-6)^2+(y-1)^2+(z+1)^2=1$$ and $$x^2+(y-5)^2+(z-4)^2=9$$ find a plane that is tangent to both of those spheres and passes through the point $$(5;2;0)$$
I tried plugging all the information in formulas but then I get a scary-looking system of equation which I don't know how to solve.
My problem book says that the correct answer is $$x+2y+2z-9=0$$ or $$y-2=0$$
Whatever I did I couldn't get the answer.

I would really appreciate any help.
Thanks in advance!

Best Answer

$C_1(6,1,-1);\;r_1=1$

$C_2(0,5,4);\;r_2=3$

A generic plane $\pi$ has equation $$\pi:ax+by+cz+d=0$$ The distance from the plane to the center of the spheres must be equal to the respective radius. Furthermore the plane must pass through $P(5,2,0)$

$$\begin{cases} \frac{|6a+b-c+d|}{\sqrt{a^2+b^2+c^2}}=1\\ \frac{|5b+4c+d|}{\sqrt{a^2+b^2+c^2}}=3\\ 5a+2b+d=0&\\ \end{cases}$$

$$\begin{cases} (6 a+b-c+d)^2=\frac{1}{9} (5 b+4 c+d)^2\\ (6 a+b-c+d)^2=a^2+b^2+c^2\\ d=-5a-2b\\ \end{cases}$$

Two solutions $a=0,b=-d/2,c=0;\;a=-d/9,b=-2 d/9,c=-2 d/9$

Two planes

$-d/2 y + d = 0\to y-2=0$

$-d/9 x -2d/9 y -2 d/9 z + d=0 \to x+2 y+2 z-9=0$