One. (20 points) If the lengths of the two legs $a, b (a \neq b)$ of a right triangle are both integers, and satisfy
$$
\left\{\begin{array}{l}
a+b=m+2, \\
a b=4 m .
\end{array}\right.
$$

Find the lengths of the three sides of this right triangle.
Since $a$ and $b$ are positive integers, $m$ is also a positive integer. Therefore, $a$ and $b$ are two distinct integer solutions of the quadratic equation $x^{2}-(m+2)x+4m=0$.

Thus, $\Delta=(m+2)^{2}-16m=m^{2}-12m+4$ must be a perfect square.
Let $m^{2}-12m+4=k^{2}$ (where $k$ is a positive integer), i.e.,
$$
m^{2}-12m+4-k^{2}=0.
$$

From this, we know that the equation (1) in terms of $m$ should have integer solutions, so
$$
\Delta^{\prime}=(-12)^{2}-4(4-k^{2})=4(32+k^{2})
$$

must also be a perfect square.
Therefore, $32+k^{2}$ is a perfect square.
Let $32+k^{2}=(k+n)^{2}$ (where $n$ is a positive integer).
Then $32=(k+n)^{2}-k^{2}=n(2k+n)$.
Clearly, $n<2k+n$.
Since $32=1 \times 32=2 \times 16=4 \times 8$, we consider three cases:
(1) $n(2k+n)=1 \times 32=1 \times (2k+1)$, which implies $k$ has no integer solution;
(2) $n(2k+n)=2 \times 16=2(2k+2)$, which implies $k=7, m=15$, and the sides of the right triangle are $5, 12, 13$;
(3) $n(2k+n)=4 \times 8=4(2k+4)$, which implies $k=2, m=12$, and the sides of the right triangle are $6, 8, 10$.

In summary, the sides of the right triangle are $5, 12, 13$ or $6, 8, 10$.