The question is how to get that and what it even means.

For one thing, as has been pointed out, $- x + \log x$ isn't injective so it's not clear even what it means for it to have an inverse. But as the Wolfram Alpha picture shows, you can certainly reflect the graph in the line $y = x$. So the first thing is to properly define the functional inverse in this case.

By the way I'm using $\log$ as the natural log and ignoring the base 3 so that there's one less irrelevant detail.

The trick to get this line of reasoning off the ground is that $e^{-x + \log x} = x e^{-x}$, which should look somewhat familiar. The function $x e^x$ is strictly increasing for $x \geq 0$ and therefore has an inverse, though not an elementary one. Its inverse is defined as the

Lambert W function.

Now the idea is to use this to get Wolfram's answer. You have to account for the $- x$ and at some point undo the exponentiation. I've made some progress but not enough.

This is of course no high school problem. Not in my high school anyway!