Let $x, y$ be integers and consider the equation $$\sqrt{x}+\sqrt{y}= 8 \sqrt{31}.$$
It is claimed that this implies $\sqrt{x}= a\sqrt{31}$ and $\sqrt{y}=b \sqrt{31}$ for $a,b$ integers.
While this is intuitively obvious, can the claim be proved by elementary means?
Square both sides and rearrange to get $2\sqrt{xy} = 64 \times 31 - x - y$.
Let the greatest common factor between x and y be a. Since xy is a square, x/a and y/a must both be squares.
Let $x = ab^2$, $y = ac^2$.
This gives us:
$2abc = 64 \times 31 - a(b^2 + c^2)$.
Looking at things modulo a, $64 \times 31$ must be a multiple of a.
$b^2 + c^2 + 2bc = 64 \times 31/a$.
So $(b+c)^2 = 64 \times 31/a$.
Since 64 * 31/a must be a square, a must be a multiple of 31.
Moreover, since 64 * 31/a is a square, it means that 31/a must also be a square (as 64 is a square). So the factors of x and y other than 31 can be taken out of the sqrt sign.