Problem: [UK 1998] Let $x,y$ and $z$ be positive integers such that $$\frac{1}{x}-\frac{1}{y}=\frac{1}{z}.$$ Let $h=(x,y,z).$ Prove that $hxyz$ is a perfect square.
My Attempt: Of course $y>x$ and therefore let $y=x+a$ for some $a>0.$ Then $$z=\frac{x(x+a)}{a}.$$ Also $$h=(x,x+a,z)=(x,a,z).$$ Now $a|x(x+a)$ since $z$ is a positive integer. Let $p$ be a prime divisor of $a$ then $p|x$ or $p|x+a$. But if $p|x\Rightarrow p|x+a$ and similarily if $p|x+a\Rightarrow p|x.$ In any case we deduce that $a|x$ and $a|x+a$ also. Thus $$z=\frac{x(x+a)}{a}=\frac{a^2k_1}{a}=ak_1$$ and $x=ak_2.$ Thus $h=a.$ The expression $hxyz=a(az)(z)=(az)^2$ which is indeed a whole square.
I would like to know whether this proof is correct or not since the argument provided in the solution is quite different from the one I've written in this question.