Let's find all right-angled triangles whose sides are integers, and when 6 is added to the hypotenuse, we get the sum of the legs.
Solution. Let $a \leq b<c$. We know that

$$
a+b=c+6, \quad \text { hence } \quad c=a+b-6 \text {. }
$$

Let's write down the Pythagorean theorem: $a^{2}+b^{2}=c^{2}$, and substitute the expression for $c$ we obtained above:

$$
a^{2}+b^{2}=(a+b-6)^{2}
$$

Rearranging this, we get:

$$
0=18+a b-6 a-6 b=18+(a-6)(b-6)-36
$$

From this, we have

$$
18=(a-6)(b-6)
$$

Then the possible values for $(a-6 ; b-6)$ are: $(-18 ;-1),(-9 ;-2),(-6 ;-3),(1 ; 18),(2 ; 9)$, and $(3 ; 6)$. In the first three cases, the value of $a$ would not be positive. For the other cases, we get the following values for $(a ; b ; c)$:

$$
(7 ; 24 ; 25), \quad(8 ; 15 ; 17) \quad \text { and } \quad(9 ; 12 ; 15) \text {. }
$$