In 2010, Gallardo proved that the only even perfect number that is also a sum of two cubes is $28$. Here is a link to his proof (see the second page). The first part goes roughly as follows:
Let $N$ be an even perfect number. Assume that $N=x^3+a^3=(x+a)(x^2-xa+a^2)$. Note that $x$ and $a$ have the same parity. Consider the case $x+a<x^2-xa+a^2$. By the Euclid–Euler theorem, it follows that $N=2^{p-1}(2^p-1)$, where $2^p-1$ is a Mersenne prime. Thus, $x+a=2^{p-1}$ and $x^2-xa+a^2=2^p-1$.
This is the step I don't understand. I get that $2^p-1>2^{p-1}$, so $2^p-1$ must be a factor of $x^2-xa+a^2$. But I don't see why all of $2^{p-1}$ has to be a factor of $x+a$. Why can't we have, say, $x+a=2^{p-2}$ and $x^2-xa+a^2=2(2^p-1)$?