Equation $(a+b)^a=a^b$

Solution 1:

Your equation means that $(2+\frac xa)^a$ is an integer. This is only possible if $2+\frac xa$ is itself an integer. In particular, $x$ is divisible by $a$. Therefore we may write $b=ka$ for some integer $k\geq2$. Using this in the original equation, we obtain $$((k+1)a)^a = a^{ka}$$ or equivalently $$(k+1)^a = a^{(k-1)a}$$ which further simplifies to $$k+1=a^{k-1}.$$ This implies $k+1\geq 2^{k-1}$, leaving us with the possibilities $k=2,3$. These give us the solutions $(k,a)\in\{(2,3),(3,2)\}$, which gives us the solutions of the original equation: $$a=2,b=6,\\a=3,b=6.$$