Find all ordered triples $(x,y,z)$ of prime numbers satisfying equation $x(x+y)=z+120$ This question was from my Math Challenge II Number Theory packet, and I don't get how to do it. I know you can distribute to get $x^2+xy=z+120$, and $x^2+xy-z=120$, but that's as far as I got. Can someone explain step by step?

If $x = 2$, the left side is even - hence, $z $ must also be $2$.
If $x$ is an odd prime and $y$ is also odd, the left side is again even, implying that $z = 2$.
So the interesting case is when $x$ is an odd prime and $y = 2$; in this case, we have that
$$x(x + 2) = z + 120$$
Upon adding $1$ to both sides and factoring, we have
$$x^2 + 2x + 1 = z + 121 \implies (x + 1)^2 - 11^2 = z \implies (x + 12)(x - 10) = z$$
Hence $x = 11$.
So the solutions are $(2, 59, 2)$ and $(11, 2, 23)$.
