Two circles touching a line and the axes If the circle $C_1$ touches x-axis and the line $y=x \tan\theta$,$\theta \in (0,\frac{\pi}{2})$ in the first quadrant and circle $C_2$ touches the line $y=x \tan\theta$,y-axis and circle $C_1$ in such a way that ratio of radius of $C_1$ to the radius of $C_2$ is 2:1,then value of $\tan\frac{\theta}{2}=\frac{\sqrt a-b}{c}$,where $a,b,c$ are relatively prime natural numbers.Then find $a+b+c$.
I tried the condition of external touching but center of circles not given,so failed.Can someone guide me to solve this question?
 A: The touching points all have the same distance from the origin (where the tangents intersect). So let the touching points with the axes be $(1,0)$ and $(0,1)$ (after scaling if necessary).
If $r$ is the radius of $C_1$ then the circle centers are at $(1,r)$ and $(\frac r2,1)$ and what we are looking for is $\tan\frac\theta2=r$. Also, $|(1,r)-(\frac r2,1)|=\frac32r $, i.e., $$\frac94r^2=\left(1-\frac r2\right)^2+(r-1)^2,$$
hence
$$r^2+3r-2=0$$
and finally 
$$ r=  \frac{-3\pm\sqrt{17}}{2}$$
(where the negative solution is ruled out geometrically).
There is an obvious way to write $ \frac{\sqrt{17}-3}{2}$ as $\frac{\sqrt a-b}c$ with coprime $a,b,c\in\mathbb N$, and that leads to $a+b+c=22$. It turns out that the obvious solution is the only one.
A: Let the radius of circle $C_2$ be $R_2$ & center $O_2$ & the radius of the circle $C_1$ will be $R_1$ & center $O_2$ $\forall\ \frac{R_1}{R_2}=2$ 
Now, let the circles touch at any point say $P(d, d)$ on the line $y=x$ then in right $\triangle OPO_1$  $$\tan\frac{\theta}{2}=\frac{R_1}{d}$$ $$d=R_1\cot\frac{\theta}{2}$$ Similarly, in right $\triangle OPO_2$ $$\tan\left(\frac{90^\circ-\theta}{2}\right)=\frac{R_2}{d}$$ 
$$\tan\left(45^\circ-\frac{\theta}{2}\right)=\frac{R_2}{R_1\cot\frac{\theta}{2}}$$ $$\frac{\tan 45^\circ-\tan\frac{\theta}{2}}{1+\tan 45^\circ\tan\frac{\theta}{2}}=\frac{1}{2}\tan\frac{\theta}{2}$$ 
$$\frac{1-\tan\frac{\theta}{2}}{1+\tan\frac{\theta}{2}}=\frac{1}{2}\tan\frac{\theta}{2}$$ $$2-2\tan\frac{\theta}{2}=\tan\frac{\theta}{2}+\tan^2\frac{\theta}{2}$$ $$\tan^2\frac{\theta}{2}+3\tan\frac{\theta}{2}-2=0$$ Now, solving the above quadratic equation for $\tan \frac{\theta}{2}$ we get $$\tan \frac{\theta}{2}=\frac{-3\pm\sqrt{3^2-4(1)(-2)}}{2(1)}$$ $$=\frac{-3\pm\sqrt{17}}{2}$$ But, we have $0<\theta<\frac{\pi}{2}\implies \tan \frac{\theta}{2}>0$, hence, we get $$\tan \frac{\theta}{2}=\frac{-3+\sqrt{17}}{2}=\frac{\sqrt{17}-3}{2}$$ Now, compare above with $\tan\frac{\theta}{2}=\frac{\sqrt a-b}{c}$, we get $\color{red}{a=17, b=3, c=2}$ Hence $$\bbox[5px, border: 2px solid #C0A000]{\color{blue}{a+b+c=17+3+2=\color{red}{22}}}$$
