Artificial intelligent assistant

Get length of cathetus/i from length of hypothenuse and ratio between catheti? How can I calculate the length of the cathetus in a triangle if I know the length of the hypotenuse and the ratio between the two catheti? For example: The hypotenuse is $5$cm long, and the ratio between the catheti is $4:3$ - how long are the catheti or either cathetus?

Let the ratio be 1:r and the hypotenuse be h. Then the sides are then x and rx for some x. By the Pythagorean Theorem we get $x^2+r^2*x^2=h^2$. So $x=\sqrt{{h^2}/(1+r^2)}$. We can then calculate rx, the other side.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy eb83a925cfb8b2be187bd224e0360e10