I don't understand how they got $e^{sn}$ from $x^{a|x^a|sn}$.
This solution is also not something I feel is reasonable to produce without influence. What made them think to multiply $|x^a|n$ of both sides of the GCD equation?
Now, I tried to prove it, and ended up proving that $|x^a|=m$ and was wondering what I did wrong:
Proof.
$(sn)(a) + (t)(mn)=n\Rightarrow\text{gcd}(a,mn)=n$.
$$|x^a| = \frac{|x|}{\text{gcd}(a,|x|)} = \frac{mn}{\text{gcd}(a,mn)} = \frac{mn}{n} = m.$$

Correct is: $ \frac{mn}{(a,mn)} = m \frac{n}{(a,n)}$ is a multiple of $m$ by $(a,mn) = (a,n)\,$ by $(a,m)=1\,$ and Euclid, and, of course, $\,(a,n)\mid n.$