I want to find a series of steps or equations, that if possible can be put into a spreadsheet to solve the general case of the following problem. A straight line length $(a+b)$ touches two circles, radius $r_1$ centre $(x_1,y_1)$ and radius $r_2$ centre $(x_2,y_2)$. The point $O$ of this line is fixed to another straight line equation $y=mx+c$ such that length from this line to the first circle is always $a$ and from this line to the second circle is always $b$. I wish to get the coordinates $(x_a, y_a)$ and $(x_b, y_b)$ at where the line touches each circle and also $(x_O,y_O)$ at where it intersects $y=mx+c$. So far I have only managed to get answers by trial and error and not by drawing or mathematical calculation. The smaller circle is not always inside the larger circle.