Let's determine the positive integer values of $x$ and $y$ that satisfy the equation

$$
(x-6)(y-6)=18
$$

Based on this problem, determine the right-angled triangles whose sides can be expressed as integers and for which the measure of three times the perimeter is equal to twice the area.
$1^{\circ}$. $x-6$ and $y-6$ are integers whose product is 18; thus, if we factorize 18 into pairs of factors in every possible way, we obtain all the values of $x-6$ and $y-6$. But

$$
18=1 \times 18=2 \times 9=3 \times 6
$$

so

$$
\text{values of } x-6: 1,2,3 ; \text{values of } y-6: 18,9,6.
$$

Therefore,

$$
\text{values of } x: 7,8,9 ; \text{values of } y: 24,15,12.
$$

The values of $x$ and $y$ can also be swapped.

$2^{\circ}$. If the legs of the right triangles to be determined are $x$ and $y$, then according to the problem:

$$
3\left(x+y+\sqrt{x^{2}+y^{2}}\right)=x y
$$

or

$$
3 \sqrt{x^{2}+y^{2}}=x y-3 x-3 y \\
9 x^{2}+9 y^{2}=x^{2} y^{2}-6 x^{2} y+9 x^{2}-6 x y^{2}+18 x y+9 y^{2}
$$

or

$$
x^{2} y^{2}-6 x y(x+y)+18 x y=0
$$

Dividing by $x y$:

$$
x y-6(x+y)+18=0
$$

which can also be written as:

$$
(x-6)(y-6)=18
$$

which is the same equation as the given one.

Thus, the legs of the sought triangles are: 9 and 12, 8 and 15, 7 and 24.

The corresponding hypotenuses are: $15,17,25$.

(Weisz József.)

The problem was also solved by: Barabás S., Barna D., Devecis M., Freibauer E., Krausz B., Krisztián Gy., Manheim E., Prohászka J., Sasvári G., Spitzer Ö.