Sangaku - Find diameter of congruent circles in a $9$-$12$-$15$ right triangle My attention was brought to a sangaku problem in this book by Ubukata Tou. It shows this figure:

The question asks us to find the diameter of the circles (both circles are congruent) in a right triangle ($∠ABC = 90$), where $AB = 9$ and $BC = 12$. It also says that the diameter of the two circles is $30/7$. How would you solve this problem. In the book, it also states that this was a problem from the early Edo period suggesting that trigonometry may not have been around in Japan then. It would be very interesting to see a solution without the use of trigonometry then.
 A: Let $M$, $N$ be the centers of circles respectively closer to $A$, $C$. Let parallel to $BC$ trough $N$ and parallel to $AB$ trough $M$ intersect at $L$. 
Let circles touch $AC$ at $P$ and $Q$ ($P$ closer to $A$). Then $MNQP$ is rectangle so $PQ = 2r$ and let $AP=x$ and $CQ=y$. Let circles touch $BC$ at $R$ and $AB$ at $S$. 

Then $CR = y$ and $AS=x$. Since $AC= 15$ we have $$x+y+2r =15$$ where $r$ is radius of circles. Since $\triangle ABC\sim \triangle MLN$ we have $${2r\over 15} = {9-x-r\over 9} = {12-y-r\over 12}$$ we get $$ x= {15-11r\over 5}\;\;\;\;{\rm and}\;\;\;\;y={60-13r\over 5}$$
Pluging this into $x+y+2r=15$ we get $$r={15\over 7}$$
A: From the figure below, $\triangle AJI \cong \triangle KJC$. So $9+4z = 12-3z$, and $z = \frac 37$.
So one of the circles is the inscribed circle of the triangle which have side lengths $\frac{75}{7}, \frac{60}{7}$ and $\frac{45}{7}$, so the radius is
$$
\frac 12 \left(\frac{45}{7} + \frac{60}{7} - \frac{75}{7}\right) = \frac{15}{7}.
$$

A: Using Aqua's proof, the general solution for any right triangle is:
$$
x = \frac{S_3}{2} \cdot \frac{S_1 - S_2 + S_3}{S_1 + S_2}\\
y = \frac{S_3}{2} \cdot \frac{-S_1 + S_2 + S_3}{S_1 + S_2}\\
r = \frac{S_3}{2} \cdot \frac{S_1 + S_2 - S_3}{S_1 + S_2}
$$
for adjacent sides $S_1$ and $S_2$, and hypotenuse $S_3$.
