Given a right triangle, the sum of the two legs is $p$ and the altitude to the hypotenuse is $m$; calculate the sides of the triangle and construct the triangle.
If the legs of a right triangle are $a$ and $b$, and the hypotenuse is $c$, then

$$
a+b=p
$$

thus

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

but

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

and

$$
a b=m c
$$

so

$$
c^{2}+2 m c=p^{2}
$$

from which

$$
c=-m+\sqrt{m^{2}+p^{2}}
$$

Based on (1) and (2), $a$ and $b$ are the roots of the following equation:

$$
x^{2}-p x+m c=0
$$

from which

$$
\begin{aligned}
& x_{1}=a=\frac{p+\sqrt{p^{2}-4 m c}}{2} \\
& x_{2}=b=\frac{p-\sqrt{p^{2}-4 m c}}{2}
\end{aligned}
$$

Construction. Based on (3), we construct $c$: we construct a right triangle whose legs are $m$ and $p$; from the hypotenuse of this triangle, we subtract $m$, and the remainder is $c$. Then we draw a semicircle over $c$; at a point of $c$ chosen arbitrarily, we draw a perpendicular and measure $m$ on it; through the endpoint of $m$, we draw a line parallel to $c$, which intersects the semicircle at two points; connecting these points with the endpoints of $c$, we obtain two triangles that satisfy the requirements of the problem.

(Goldziher Károly and Kármán Tódor.)

The problem was also solved by: Dénes A., Freibauer E., Friedmann B., Posgay B., Szabó I., Szabó K., Weisz Á.