Suppose $f(x) = e^{-|x|}$ then it follows:
$$y = e^{-|x|} $$
$$x = e^{-|y|} $$
$$ \log(x) = -|y| $$
$$-\log(x) = |y| $$
Im assuming the equation for the inverse depends on the range of $x$, and the range of $x$ is $0$ to $\infty$. I am just not sure where to go next.
In your second step
$$y = e^{-|x|} \iff x = e^{-|y|} $$
you should specify you are changing variables to avoid confusion.
To find the inverse note that $f:\mathbb R \to (0,1]$ is even and that $f(x)$ is monotonic for $x\ge 0$ then we can find the inverse for the restriction
$$f:[0,\infty) \to (0,1] $$
that is
$$y = e^{-x} \iff \log y =\log (e^{-x})=-x$$
then the inverse function is
$$f(x)=-\log x$$
In a similar way for the restriction
$$f:(-\infty,0] \to (0,1] $$
the inverse function is
$$f(x)=\log x$$