Is there a closed-form solution for tangent circle in lens of two other circles? I am given real values $p, s, t, u$  and wish to find unknown values $r, v$.  As shown in the diagram below, $p$ and $s$ are radii of two given circles, with centers at $(0,-p)$ and $(0,t)$. 
At present I'm using Newton's method to solve $a(v)=b(v)$ for $v$, with $a(v) = p - \sqrt{u^2 + v^2}$ [from $(p-a)^2=u^2 + v^2$] and  $b(v) = s - \sqrt{u^2 + (t-v)^2}$ [from $(s-a)^2=u^2 + (t-v)^2$], with $a$ and $b$ representing the after-intersecting portions of rays from $(0,-p)$ and $(0,t)$.  When  $a(v)=b(v)$, we have $a(v)=b(v)=r$.  Given $r$ or $v$ it's trivial to find the other and to find tangency point G, etc.
Is there a better method, preferably some closed form, for finding $r$ or $v$ when given  $p, s, t, u$?

 A: We can compute the distance from the centers of the two large circles to the center of the small circle in two ways: by the distance formula, and by taking the difference of their radii. This gives us the equations
\begin{align}
    (s - r)^2 &= u^2 + (v-t)^2 \\
    (p-r)^2 &= u^2 + (v+p)^2
\end{align}
These are quadratic in $r$ and $v$, but taking the difference of these two equations and simplifying gives us a linear equation in $r$ and $v$:
$$
    s^2 + (2p - 2s) r  = t^2 - (2p + 2t)v.
$$
We can solve for either unknown variable in terms of the other; for example, we can take
$$
   r = \frac{t^2 - s^2 - (2p+2t)v}{2p-2s}.
$$
Now substitute this expression for $r$ into either of the original equations, and you get a quadratic equation for $v$. This can be solved using the quadratic formula; the expression you get is messy, but still gives a closed form for $v$ (and therefore for $r$).
A: The locus of the centers of the circles tangent to the two fixed circles is a hyperbola (that degenerates to a double line when $p=s$) with center at $C=\left(0,(t-p)/2\right)$ and asymptotes perpendicular to the common external tangent lines to the fixed circles. The vertices of this hyperbola are the centers of the two tangent circles that lie on the $y$-axis. We want the branch with vertex $V=\left(0,(t-s)/2\right)$. Once we have the equation of this hyperbola, finding $v$ is a matter of setting $x=u$ in the equation and solving the resulting quadratic. The radius $r$ of the tangent circle is then easily found from the radius of one of the fixed circles and the distance between its center and the resulting point.  

A way to find the equation of this hyperbola is to compute the common external tangent lines to the fixed circles. Using similar triangles, these tangents intersect on the $y$-axis at a $y_0$ such that $${y_0-t\over s}={y_0+p\over p},$$ from which $$y_0 = {p(s+t)\over p-s}. \tag1$$ (We’ll assume that $p\ne s$ for now.) Omitting the gory details of the computation, the resulting tangent lines are $$(2p-s+t)x \pm (p-s)\sqrt{{2p-s+t\over s+t}}y \mp p\sqrt{(2p-s+t)(s+t)} \tag2$$ and so the equation of the hyperbola is $$\left((p-s)\sqrt{{2p-s+t\over s+t}} x\right)^2 - \left((2p-s+t)\left(y-\frac12(t-p)\right)\right)^2=k \tag3$$ for some yet-to-be-determined constant $k$. The left-hand side of (3) is just the product of the equations of the perpendiculars through $C$ to the two lines from (2). To find the correct value of $k$, substitute the coordinates of the vertex $V$ into (3), producing after simplification $k=-(p-s)^2(2p-s+t)^2/4$. When $s=p$, the equation of the hyperbola reduces to $y=(t-p)/2$, a horizontal line through $C$, which is now the midpoint of the two fixed circle centers, as one would want.  
I’ll leave working out a closed-form solution for $v$ from this to you. I would avoid expanding (3) since the square for $y$ is already completed, which brings you pretty close to the solution already.
