306. Given the leg and the sum of the other two sides of a right triangle, determine these sides.
306. This arithmetic book (Teaching on integers and fractions) was published in Leipzig in 1507.

Given the leg $a$ and the sum of the other leg and the hypotenuse

$$
S=b+c
$$

Since

$$
c^{2}=a^{2}+b^{2}
$$

then

$$
c^{2}=\left(S-b\right)^{2}
$$

gives

$$
a^{2}+b^{2}=S^{2}+b^{2}-2 S b
$$

from which

$$
b=\frac{S^{2}-a^{2}}{2 S}
$$