Finding integer solutions to the system $xy=6(x+y+z)$, $x^2+y^2=z^2$ How do you go about solving a system of equations like below for integer solutions?
$$xy=6(x+y+z)$$
$$x^2+y^2=z^2$$
Would you first try and list out a number of Pythagorean triples, then try and see which ones when multiplied are divisible by 6 (by 2 and 3)? Since the other side is just the sum of the 3 of them left.
I mean is there an elegant way to find these triplets, apart from a brute-force or any exhaustion method? Or even using Graphs perhaps? And why is there not infinite solutions to this? (there are actually 6 triplets).
P.S. As a bonus, replace the first equation above with:
$$x^2 + (z-510)x + 1020p = 0$$
while in the 2nd equation:
$$y=1020p/x$$
where $p$ is Prime.
Mathematica gives me only 2 solutions for $p$ for this. But how??

This is the first way that came to my mind.  Maybe there is a shorter way.
$$(x+y)^2=z^2+12z+12(x+y)$$
$$t^2-12t-(z^2+12z)=0, ~t=x+y$$
$$\Delta_{\text{half}}=36+z^2+12z=(z+6)^2$$
$$t_{1,2}=6±|z+6|=6±z+6=12±z$$
$$x+y=12±z$$
$$xy=6(x+y+z)=6(z+12±z)$$
If $x+y=12-z$, then $xy=72$.
Check all integers $x,y$ such that $xy=72$.

If $x+y=12+z$, then
$$xy=6(x+y+z)=6(12+2z)=12(z+6)$$
Finally, we have
$$(x-y)^2=(x+y)^2-4xy=(12+z)^2-48(z+6)=z^2-24z-144=(z-12)^2-288$$
$$(z-12)^2-(x-y)^2=288$$
$$(z-12-x+y)(z-12+x-y)=288=2^5×3^2$$
Then, check all possible factors of $288$:
If $m=±1,±2 \cdots ±288$, then
$$\begin{cases} z-x+y-12=\frac{288}{m} \\z+x-y=m \\x+y=12+z \end{cases}$$
