<s>[INST] Computing a circle from a given set with a tangent line condition I was asked to compute the circles' equations from the set
$$x^2 + y^2 -3x + (k-6)y + (9-3k)=0$$
that fulfill the following request: the circles must be tangent to the line
$$x+y-3=0$$
I started to compute
$$
\begin{cases}
x^2 + y^2 -3x + (k-6)y + (9-3k)=0\\
x+y-3=0
\end{cases}
$$
$$
\begin{cases}
x^2 + y^2 -3x + (k-6)y + (9-3k)=0\\
x=3-y
\end{cases}
$$
obtaining
$$
\begin{cases}
2y^2 +(k-3)y +(9-3k)=0\\
x=3-y
\end{cases}
$$
Now, in order to obtain a tangent line to the circle, I must put the condition $\Delta=0$, yielding
$$(k-3)^2-8(9-3k)=0$$
and so
$$k_1=3, \quad k_2=-24$$
So I have the circles, by replacing $k$:
$$x^2 + y^2 -3x -3y =0$$
and
$$x^2 + y^2 -3x -30y + 81=0$$
while the solutions reported were $$x^2+y^2-3x-5y+8=0$$ and $$x^2+y^2-3x-13y+32=0$$
Could anyone tell me where I am getting wrong?
Thanks in advance.
 [/INST] Once you spotted the obvious solution 
$k=3$, you can factor
$$(k-3)^2-8(9-3k)=(k-3)\left[k-3+24\right]=(k-3)(k+21)$$
and so the second solution is $21$, not $24$.

There is another mistake earlier when you develop $x^2=(y-3)^2$, it looks like you implicitly wrote $(y-3)^2=y^2+3^2$, forgetting the rectangular term.
</s>