This might not be what you asked for, since I'm not using numerical methods, only simple square roots. I'm using a completely different approach than you'd likely have considered, though. I consider it rather elegant, so I'm posting this since it might be what you (or someone else reading your question) wants, if you only knew this was possible.
Theoretic background
Vectors in Lie geometry
I'm going to address this question using techniques from Lie geometry, using the problem of Appollonius as the central building block.
You can represent a circle as a vector $(x, y, \pm r, x^2+y^2-r^2, 1)^T$ or any multiple thereof (homogeneous coordinates). Any circle $c$ will satisfy $c^TLc=0$, with the matrix $L$ (describing the Lie quadric) given by
$$L=\begin{pmatrix}
-2 & 0 & 0 & 0 & 0 \\
0 & -2 & 0 & 0 & 0 \\
0 & 0 & 2 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 \\
0 & 0 & 0 & 1 & 0
\end{pmatrix}$$
(I'm using a different basis than Wikipedia and most of the literature does, but I find it convenient.) Points are special circles of radius $0$, i.e. vectors of the form $(x,y,0,x^2+y^2,1)$ or multiples thereof. Lines are special circles of radius infinity and with a center at infinity as well. In homogeneous coordinates, this results in the last coordinate becoming zero. More precisely, a line $ax+by+c=0$ is encoded using the vector $(a,b,\pm\sqrt{a^2+b^2},-2c,0)^T$.
Two circles $a,b$ are in oriented contact to one another if they satisfy $a^TLb=0$. Oriented contact means that they touch one another and their orientation agrees. You can imagine orientation as an arrow drawn anywhere along the circle. If at the touching points the arrows agree in direction, you have oriented contact. So all circles are oriented, and the lines as well. That's the reason I had $\pm$ for the radius up there: change of sign switches orientation. Points have no radius and therefore no orientation.
Apollonius' problem
The problem of appollonius is this: given three circles $a,b,c$, find a circle $d$ which touches all of these. So you want $a^TLd=b^TLd=c^TLd=d^TLd=0$. The first three of these can be encoded in a linear system of equations. This will have a two-dimensional space of solution. The last is a quadratic equation which will in general select two one-dimensional spaces from this set of solutions. Picking any non-zero representative from each of them gives you homogeneous coordinates for the touching circles. So even after you fix all the orientations (except perhaps for the result), you still get two possible answers. Changing signs of the input will change the output, but changing all signs in the input simply changes all signs in the output but leaves everything else in place.
How to use this
Obtaining the tangent lines
In your case, you only have two circles, not three, but you also have the extra requirement that the touching “circles” should in fact be lines, with a zero in the last coordinate. So you can write $L$ times the two circles as two equations, and a third equation (representing the “point at infinity”) for the last equation. If you want a marix representation, I'd write it like this:
$$\begin{pmatrix}
-2x_1 & -2y_1 & +2r_1 & 1 & x_1^2+y_1^2-r_1^2 \\
-2x_2 & -2y_2 & \pm2r_2 & 1 & x_2^2+y_2^2-r_2^2 \\
0 & 0 & 0 & 0 & 1
\end{pmatrix}\cdot v=0$$
This is an underdetermined system of linear equations, which will in general have a two-dimensional solution space. Or in other words, the matrix has a two-dimensional right kernel. Name that kernel $\operatorname{span}(v_1,v_2)=\{\lambda v_1+\mu v_2\mid \lambda,\mu\in\mathbb R\}$. Find a linear combination which satisfies
$$(\lambda v_1+\mu v_2)^T\cdot L\cdot(\lambda v_1+\mu v_2)
= \lambda^2(v_1^TLv_1)+2\lambda\mu(v_1^TLv_2)+\mu^2(v_2^TLv_2) = 0$$
with the matrix $L$ as given above. This is still a homogeneous equation. In general you can choose one of the two coefficients arbitrarily, for the other you will have two solutions. Each of the resulting vectors has the form
$$(\lambda v_1+\mu v_2)=(a,b,\pm\sqrt{a^2+b^2},-2c,0)^T$$
and corresponds to a line with the equation $ax+by+c=0$ which is tangent to your circles. As you saw my original linear system of equations had one sign given as $\pm$. The positive sign will lead to the outer tangents (both circles oriented the same way), the negative one to the inner tangents (circles oriented in opposite ways).
Obtaining the points of intersection
So now you have the lines, but you want the points of tangency. If you have two circles $a,b$ in oriented contact (i.e. $a^TLb=0$), then the contact element, i.e. the set of all circles touching these two in the same point with the same orientation, is simply the span of the two vectors. So take one circle and one tangent, and from their span choose the one element which is a point, i.e. has radius zero.
More precisely, if you have the circle $(x,y,\pm r,x^2+y^2-r^2,1)^T$ and the line $(a,b,\pm\sqrt{a^2+b^2},-2c,0)^T$, multiply the former by the third coordinate of the latter, and the latter by the third coordinate of the former, then subtract these two. You get something point-like, which you can divide by its last component to obtain a representative whose first two coordinates are the coordinates of the point of tangency.
Room for simplifications
The above contains the general approach I'd choose to any problem which can be addressed using Lie geometry. It's essentially a recipe for solving Apollonius' problem or anything closely related to this. In your particular case, the last line of the system of linear equations forces the last coordinate of any solution $v$ to be zero. This in turn means that the last column of the first two rows is irrelevant. When computing $\lambda$ and $\mu$ you could likewise ignore the third and fourth coordinate, and concentrate on the first three. But I'd like to show you where this came from, and how general the tool is.