Consider that we have a line $p:x+2y+2=0$, which we can rewrite in explicit form as $p:y=\frac{-1}{2}x-1$. On this line lies the center of a circle $K$ which intersects circles $K_1:(x-3)^2+y^2=9$ and $K_2:x^2+(y+4)^2=16$ at a right angle. What is the equation of this circle $K$ in form of $K:(x-p)^2+(y-q)^2=r^2$?
Here is what $p$, $K_1$, $K_2$ look like:

The solution should be $(x-4)^2+(y+3)^2=1$. I don't need a full solution, but just the basic idea of where to start would be appreciated.
Call the centers of the circles $C_1, C_2, C_3$, and the radii $r_1, r_2, r_3$. We know
$$ C_1 = (3,0), r_1 = 3, C_2 = (0,-4), r_2 = 4$$
Two circles are perpendicular if the segment between the centers is the hypotenuse of a triangle with a radius of each circle as the legs, meeting where the circles intersect. So we can apply the Pythagorean Theorem:
$$ \begin{align*} \|C_3-C_1\|^2 &= r_1^2 + r_3^2 \\ \|C_3-C_2\|^2 &= r_2^2 + r_3^2 \end{align*} $$
If $C_3 = (x_3,y_3)$, these equations become
$$ \begin{align*} (x_3-3)^2 + y_3^2 &= r_3^2 + 9 \\ x_3^2 + (y_3+4)^2 &= r_3^2 + 16 \end{align*} $$
And the fact that $(x_3,y_3)$ is on line $p$ gives one more equation. Now there are three equations in three unknowns, and it's just a matter of solving for $x_3, y_3, r_3$.
A good next step would be