Confusion regarding usage of Lambert function
We begin with the expression
$$e^{\pi x}-x/k=-1$$
Upon rearranging, we find that
$$\begin{align} \pi k&=e^{-\pi x}(\pi x-\pi k)\\\\ &=e^{-\pi(x-k+k)}(\pi x-\pi k)\\\\ -\pi ke^{\pi k}&=e^{-\pi (x-k)}(-\pi(x-k)) \end{align}$$
Can you finish now?
You can rearrange as $$ ke^{\pi x}=x-k\\ k=(x-k)e^{-\pi x}\\ -\pi k=-\pi(x-k)e^{-\pi x}\\ -\pi k=-\pi(x-k)e^{-\pi(x-k)}e^{-\pi k}\\ -\pi ke^{\pi k}=-\pi(x-k)e^{-\pi(x-k)} $$ now set $w=-\pi(x-k)$ and $z=-\pi ke^{\pi k}$, so you have $$ z=we^w. $$