Assuming the corner of the triangle is the origin of a Cartesian plane, the line of the hypotenuse is $$y = -\frac{a}{b} x + a$$
The center of the second circle is at $\begin{bmatrix} 3r \\ r \end{bmatrix}$.
The radius of the second circle is the directed vector $\begin{bmatrix} ra \\ rb \end{bmatrix}\frac{1}{\sqrt{a^2 + b^2}}$.
Altogether :
$$\frac{rb}{\sqrt{a^2 + b^2}} + r = -\frac{a}{b}\left(3r + \frac{ra}{\sqrt{a^2 + b^2}}\right) + a$$
$$r = \frac{ab}{ 3a + b + \sqrt{a^2 + b^2}}$$
Since Blue showed an elegant volume based approach, I guess I'll try a multidimensional coordinate based approach. Suppose the origin $\begin{bmatrix} 0 \\ 0 \\ 0 \\ \vdots \end{bmatrix}$ and the points $\begin{bmatrix} \mathcal{l}_0\\ 0 \\ 0 \\ \vdots \end{bmatrix}$, $\begin{bmatrix} 0 \\ \mathcal{l}_1 \\ 0 \\ \vdots \end{bmatrix}$, $\begin{bmatrix} 0 \\ 0 \\ \mathcal{l}_2 \\\vdots \end{bmatrix}$ etc form a multidimensional right triangle. Suppose one hypersphere is tucked in at the origin and one hypersphere is tucked in at the corner along the first axis.
The hypotenuse plane of the triangle is
$$\frac{x_0}{\mathcal{l}_0} + \frac{x_1}{\mathcal{l}_1} + \frac{x_2}{\mathcal{l}_2} + \dots = 1 \tag{Plane equation}$$
Or equivalently, using $\circ$ for dot product and $N = \begin{bmatrix} \frac{1}{\mathcal{l}_0} \\ \frac{1}{\mathcal{l}_1} \\ \frac{1}{\mathcal{l}_2} \\ \vdots \end{bmatrix}$, then the plane is:
$$N \circ X = 1 \tag{Plane equation with dot product}$$
The center of the second hypershpere is $$c = \begin{bmatrix} 3r \\ r \\ r \\ \vdots\end{bmatrix} = rc_0 \tag{Center of second hypersphere}$$
The vector directed from the center of the second hypersphere to the hypotenuse plane is $$r_2 = r\frac{N}{|N|}\tag{Directed radius to hypotenuse}$$
Altogether:
$$N \circ (c + r_2) = 1$$
$$N \circ \left(rc_0 + r\frac N {|N|}\right) = 1$$
$$\begin{align} r &= \frac{1}{N \circ c_0 + |N|} \\
&= \frac{1}{3l_0^{-1} + l_1^{-1} + l_2^{-1} \dots + \sqrt{l_0^{-2} + l_1^{-2} + l_2^{-2} \dots}}
\end{align}$$
Note this is the same answer as Blue, but with $\mathcal{l}_0\mathcal{l}_1 \mathcal{l}_2 \dots$ factored out of the numerator and denominator.