Prove that $2xy\mid x^2+y^2-x$ implies $x$ is a perfect square. Prove that $2xy\mid x^2+y^2-x$ implies $x$ is a perfect square.
My work:
$2xy\mid x^2+y^2-x \implies x^2+y^2-x=2xy\cdot k$
So,$x^2+y^2+2xy-x=(x+y)^2-x=2xy \cdot (k+1)$
And,$x^2+y^2-2xy-x=(x-y)^2-x=2xy \cdot (k-1)$
I found that for $x,y$ both odd, no solution exists. For $x$ even, and $y$ odd,no solution exists. Solution exists only for $x$ odd, $y$ even and $x$ even and $y$ even solution exists. Cannot do anything more. Please help!

By hypothesis $x\mid y^2\,$ and $\, \color{#c00}x = x^2\!+\!y^2 \!-\! 2kxy \color{#c00}{\equiv (x\!-\!ky)^2} \pmod{\!y^2}\,$ so below applies.
Theorem $\quad\, x\mid y^2\,$ and $\ \color{#c00}{x\equiv z^2}\pmod{\!y^2}\,\Rightarrow\, {\pm}x\, =\,  (z,y)^2,\ $  if $\,x,y,z\in\Bbb Z$.
Proof $\ {\pm}x = (\color{#c00}x,y^2) = (\color{#c00}{z^2},y^2)  = \color{#0a0}{(z,y)^2}\, $ by GCD mod $\rm\color{#c00}{reduce}$ & Freshman's $\rm\color{#0a0}{ Dream}$. $\ \small\bf QED$
