I know it it seems trivial that $x = 1$, but I would like to know a more rigorous solution involving algebra. I tried solving for it, but could not come up with a proper solution.
My attempt:
$e = xe^x \implies e^{1-x} = x \implies (1-x)\ln e = \ln x \implies 1-x = \ln x \implies 1 = \ln x + x$
And at this point I got stuck.

The function $f(x) = xe^x$ does not have an inverse that can be expressed in terms of any finite algebraic combination of the usual functions. The two branches that form its inverse are known as the Lambert W function(s).
The equation $$ y = xe^x $$ can be solved for $y$ using a numerical approach, if an approximate solution is desired.