A right-angled triangle has a hypotenuse $a$, while the sum of three times one leg and four times the other is as large as possible. What are the lengths of the legs in these cases?
Let the sought legs be denoted by $x$ and $y$.

The system of equations for their calculation is

$$
\begin{gathered}
x^{2}+y^{2}=a^{2} \ldots \\
3 x+4 y=k \ldots
\end{gathered}
$$

We need to determine the values of $k$ for which the system of equations has real solutions. This will lead us to the largest value of $k$ for which there is a computable solution.

From (2), we get $y=\frac{k-3 x}{4}$. Substituting this into (1),

$$
x^{2}+\left(\frac{k-3 x}{4}\right)^{2}=a^{2} \quad \text { or } \quad 16 x^{2}+k^{2}-6 k x-9 x^{2}=16 a^{2}
$$

which simplifies to

$$
25 x^{2}-6 k x+k^{2}-16 a^{2}=0 \ldots
$$

The roots of this equation are real if

$$
36 k^{2}-100\left(k^{2}-16 a^{2}\right) \geq 0 \text {, or } -64 k^{2}+1600 a^{2} \geq 0
$$

Since $k$ can only be a positive number, $k \leq 5 a$ is the condition for the roots of (3) to be real.

Thus, the largest value of $k$ is $5 a$. In this case, the roots of (3) are equal, and specifically: $x=\frac{3 a}{5}$ and $y=\frac{4 a}{5}$.

The ratio of the sides of the right triangle is: $3: 4: 5$.

Sándor Baka (Br. Kemény Zsigmond g. V. o. Bp. VI.)

Note:

$$
(3 x+4 y)^{2}+(4 x+3 y)^{2}=25\left(x^{2}+y^{2}\right)=25 a^{2}
$$

From this relationship, we can see that $(3 x+4 y)^{2}$ is maximized when $(4 x-3 y)^{2}$ is minimized. The smallest value of $(4 x-3 y)^{2}$ is zero. If

$$
4 x-3 y=0, \quad \text { then } \quad \frac{x}{3}=\frac{y}{4} \quad \text { and } \quad 3 x+4 y=5 a
$$

Thus, the maximum value of $3 x+4 y$ is $5 a$ and in this case $x=\frac{3 a}{5}, y=\frac{4 a}{5}$.