<s>[INST] UK 1998, Show that $hxyz$ is a perfect square. 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.  
 [/INST] Let's try your argument with $x = 15; y = 40; z = 24$ where $\frac 1{15} - \frac 1{40}= \frac{8}{8*15} - \frac{3}{3*40} = \frac 5{5*24} = \frac 1 {24}$ and $h = (15,40,24) = 1$ and $hxyz = 1*3*5*8*5 *2*8 = (3*5*8)^2$.
You argue $40 > 15$ and $a = 40 -15 = 25$. 
So $z = 24 = \frac {15*(15 + 25)}{25}$ which is indeed true.
You argue that $h = (15,40,24) = (15,25,24)$ which is true.
You argue that if $p = 5$ a prime factor of $a = 25$ than $5|15*(15+ 25)$ and that as $5|25$ then $5|x(x + 25) \iff 5|x = 15$ which is true.
Then you conclude that since $5|15$ then $25|15$ which is not true.  We can only conclude the single power products of the prime factors divide $x$; not any powers of any prime.
You argue $z = \frac{x(x+a)}{a} = \frac {a^2k_1}{a} = ak^2$ or $24 = \frac{15(15 + 25)}{25} = \frac {25^2*\frac 35(\frac 35 +1)}{25} = 25*\frac 35\frac 85 = 25*\frac {24}{25}$. In which case $k_1=\frac {24}{25}$ is not an integer.
Likewise $15 = 25*\frac 35$ but $\frac 35$ is not an integer.  $25$ is not a common divisor to $15, 24, $  and $h \ne 25$.
Actually $h = a > 1$ should have set off huge red flags.  $h = (x,y,z)$ so this means $x,y,z$ are never relatively prime?  Well, what happens if we factor $h$ out of them all?  We have $\frac 1{x'} + \frac 1{y'} = \frac 1{z'}$ where $y' = x + 1$ and $z' = x'(x'+1)$?  Is that really the only possibility?
I think it can be fixed but it doesn't work as is.
</s>