A few days ago I was checking out some old diophantine equations that I solved some year ago and I found the equation $$(x-y)^{xy}=x^y\cdot y^x$$ where $x$ and $y$ are positive integers such that $x>y$.
I decided to check my solution and it seems that it is wrong. This is what I did: it's easy to see that both $x$ and $y$ have to even. Now, set $d=\gcd(x,y)$ so we can write $x=da$ and $y=db$ for some coprime integers $a$ and $b$, moreover it's clear that $d$ is even. Replacing we get $$d^{xy}(a-b)^{xy}=d^{x+y}a^yb^x.$$
As $x\ge 4$ and $y\ge 2$ we have $ab>a+b$, then $d^{xy-x-y}\mid a^yb^x$ and from this we get that $d\mid a^yb^x$. Here is where I deduced that $d\mid a^y$ or $d\mid b^x$, but this is not in general true (e.g. $6\mid 2^3\cdot 3^2$ but neither $6\mid 2^3$ nor $6\mid 3^2$ even when $\gcd(2,3)=1$). The rest of my solution depends on the analysis of the cases $d\mid a^y$ and $d\mid b^x$ so the above idea is crucial. By the way, the only solution seems to be the pair $(x,y)=(4,2)$.
I think my above deduction is wrong (or maybe is correct for some extra assumptions that I can't see). I try to use other approaches but I go nowhere, so how can be solved the above diophantine equation? Any ideas/hints or solutions are welcome. Thanks in advance.