We have two circles, with radii $r_1$ and $r_2$ and centres $(x_1,y_1)$ and $(x_2 ,y_2)$ respectively. These two circles touch, so we can say that the distance between the two centres is $$\sqrt{(x_1-x_2)^2+(y_1-y_2)^2} =r_1+r_2$$
We have a third circle with known radius $r_3$ and we want to find its possible centres $(x_3,y_3)$.
We know that the distance between the centre of circle $1$ and $3$ will be $$\sqrt{(x_1-x_3)^2+(y_1-y_3)^2} = r_1+r_3$$ and the distance between the centre of circle $2$ and $3$ will be $$\sqrt{(x_2-x_3)^2+(y_2-y_3)^2} = r_2+r_3$$
We can see this in the below diagram:

We can the use these two equations to solve for $(x_3,y_3)$
\begin{align}\sqrt{(x_1-x_3)^2+(y_1-y_3)^2} &= r_1+r_3\tag{1}\\
\sqrt{(x_2-x_3)^2+(y_2-y_3)^2} &= r_2+r_3\tag{2}\end{align}
as we know the values of all the other variables, $x_1,y_1,r_1,x_2,y_2,r_2,r_3$
Example:
We have a circle centre $(1,1)$, radius $2$, and a circle centre $(4,5)$, radius $3$. We want to add another circle of radius $1$.
We input all these values into the formulae above:
\begin{align}\sqrt{(1-x_3)^2+(1-y_3)^2} &= 3\tag{1}\\
\sqrt{(4-x_3)^2+(5-y_3)^2} &= 4\tag{2}\end{align}
We can solve these for $(x_3,y_3)$ to find that the two possible centres are $$(4,1)\text{ and }\left(\frac 4{25},\frac {97}{25}\right)$$
I'll leave it to you to plot these $4$ circles and see that it works!