So let's solve $\displaystyle e^x-x+\pi i+1=0 $.

Note $\displaystyle z=W(z)e^{W(z)}\implies e^{W(z)} = \frac{z}{W(z)}\implies e^{-W(z)} = \frac{W(z)}{z} $.

Consider $\displaystyle -W(e) $

Now $\displaystyle e^{-W(e)}+W(e)+\pi i+1 = \frac{W(e)}{e}+W(e)+\pi i+1 $

Therefore we want our $\displaystyle e^x $ term to get a "$\displaystyle \cdot e $" and change sign to cancel out the $\displaystyle W(e) $'s. Doing this though luckily can cancel out $\displaystyle \pi i $ and $\displaystyle 1 $ too!

Thus our solution to solve this equation is $\displaystyle x=-W(e)+\pi i+1 $.

Observe $\displaystyle W(e) = 1\implies x=\pi i $