<s>[INST] Ratio of radii of two circles inscribed in a right isosceles triangle. There is a right isosceles triangle $\triangle ABC$ with the vertex $B$ facing the hypotenuse.
A circle is inscribed into the triangle with radius $r_1$, then another circle with radius $r_2$ is inscribed in the leftover space close to either $A$ or $C$ but not $B$

What is the ratio $\large{\frac{r_1}{r_2}}$ equal to?
My Attempt:

Let's call the circle with radius $r_1$, $C_1$ and the other circle with radius $r_2$, $C_2$


The smaller circle shall be closer to vertex $A$.


The Length from $A$ to $C_2$s tangents will be called $h_1$, and from these tangents to $C_1$s tangents will be called $h_2$. The length of the legs of the triangle will be called $x$.


If we draw a line from $C_1$ to $A$ we will see $r_1$ and $r_2$ are bases of similar triangles.



This means $\large{\frac{h_1}{r_2}=\frac{h_1+h_2}{r_1}}$


If we ignore $C_2$ we can see the triangle is made up of four smaller triangles and a square, since the sum of the area of these shapes will be equal to the area of the triangle: $$\large{2r_1(x-r_1)+r_1^2=\frac{x^2}{2}\\2xr_1-r_1^2=\frac{x^2}{2}\\-r_1^2+2xr_1-\frac{x^2}{2}=0}$$ From the quadratic equation:$$\large{\frac{-2x\mp\sqrt{4x^2-2x^2}}{-2}\\x\mp\frac{x}{\sqrt{2}}}$$ Since we know $r_1$ must be less than $x$
$$r_1=x-\frac{x}{\sqrt{2}}$$


$h_1+h_2$ is exactly half of the hypotenuse, this means $h_1+h_2=\frac{x}{\sqrt{2}}$


From this it follows that $$\large{\frac{h_1+h_2}{r_1}=\frac{\frac{x}{\sqrt{2}}}{x-\frac{x}{\sqrt{2}}}=\frac{1}{\sqrt{2}-1}}$$


Since $\large{\frac{h_1}{r_2}=\frac{h_1+h_2}{r_1}}$,  $\large{\frac{h_1}{r_2}=\frac{1}{\sqrt{2}-1}}$ and $\large{(\sqrt{2}-1)h_1=r_2}$


Because $h_1+h_2=\frac{r_1}{\sqrt{2}-1}$$$\large{h_2=\frac{r_1-r_2}{\sqrt{2}-1}}$$


If we extend a line like so...



We can see $\large{(h_2)^2+(r_1-r_2)^2=(r_1+r_2)^2}$

 [/INST] Look at your third diagram.
Follow the line from vertex A to the center of the smaller circle.
Where that first intersects the smaller circle label as point D.
Let $x$ denote the length of segment AD.
Then
\begin{equation}
\frac{r_2}{x+r_2}=\sin\left(\frac{\pi}{8}\right)\tag{1}
\end{equation}
and
\begin{equation}
\frac{r_1}{x+2r_2+r_1}=\sin\left(\frac{\pi}{8}\right)\tag{2}
\end{equation}
Solve equation (1) for $x$ in terms of $r_2$. Then substitute that for $x$ in equation (2).
The resulting equation can be solved for $r_1$ as a fixed constant times $r_2$ from which you can get the desired ratio of $r_1$ to $r_2$.
ALTERNATE APPROACH
This can also be solved using the geometric series:
When $|x|<1$ then
$$ 1+x+x^2+x^3+\cdots =\frac{1}{1-x} $$
Rather than the ratio $\dfrac{r_1}{r_2}$ let us consider its reciprocal $P=\dfrac{r_2}{r_1}<1$.
At present we have two circles, call them $C_1, C_2$. Continue that sequence of circles where $C_3$ bears the same relation to $C_2$ that $C_2$ bears to $C_1$. Keep that going so that we have a sequence of circles in the triangle approaching $A$. Let $D_1=2r_1,D_2=2r_2, D_3=2r_3, \cdots$.
The ratio of the diameters successive diameter will be the same as the ratio of their radii. So each diameter has length $P$ times the length of the diameter of the previous circle.
So the sum of all the circle diameters in the triangle is
$$ S=D_1+D_1P+D_1P^2+D_1P^3+\cdots=\frac{D_1}{1-P}=\frac{2r_1}{1-P} $$
Now we can solve for $S$ another way. It equals the sum of $r_1$ and the distance from the center of $C_1$ to $A$.
$$ S=r_1+r_1\csc\left(\frac{\pi}{8}\right) $$
So we have
\begin{eqnarray}
\frac{2r_1}{1-P}&=&r_1+r_1\csc\left(\frac{\pi}{8}\right)\\
1-P&=&\frac{2}{1+\csc\left(\frac{\pi}{8}\right)}\\
1-P&=&\frac{2\sin\left(\frac{\pi}{8}\right)}{\sin\left(\frac{\pi}{8}\right)+1}\\
P&=&\frac{1-\sin\left(\frac{\pi}{8}\right)}{1+\sin\left(\frac{\pi}{8}\right)}\\
\frac{r_1}{r_2}&=&\frac{1}{P}=\frac{1+\sin\left(\frac{\pi}{8}\right)}{1-\sin\left(\frac{\pi}{8}\right)}\end{eqnarray}
</s>