And thus $r=W_0(w\cdot e^1)+1$. The only thing left is to show, that $f(W_0(w\cdot e^1)+1)$ is a minimum:
$f(0)=0$ is bigger than $f(1)=e^1-w$ because $w>e^1$. So $f(0)$ cannot be the minimum of $f$.
Because $\lim_{r\rightarrow\infty} f(r)=\infty$ one can show, that $f([0,\infty))$ is bounded from below and thus has an infifum. Because $[0,\infty)$ is closed and $\lim_{r\rightarrow\infty} f(r)=\infty$, this infimum must be attained by an argument. The above computed value for $r$ is the only possible candidate for such an minumum.
Note that the Lambert W function $W(x)$ has a unique value $W_0(x)$ for $x\ge0$ (which is the case with our $x=w\cdot e^1$). For $x<0$ there are two branches $W_0(x)$ and $W_1(x)$.
Let be $f(r)=r(e^r-w)$ with domain $[0,\infty)$. Setting $f^\prime(r)=0$ for calculating the maxima/minima you get $$0=f^\prime(r)=(e^r-w)+re^r$$
This can be solved with the Lambert W function $W$. You get
$\begin{align} 0 & = (e^r-w)+re^r \\ e^{-r} & = \tfrac 1w + \tfrac 1w r \\ & \quad\left\downarrow\ \text{Set } s=r+1\right. \\ e^{-s+1} & = \tfrac sw \\ w\cdot e^1 & = se^s \\ s & = W_0(w\cdot e^1) \end{align}$
And thus $r=W_0(w\cdot e^1)+1$. The only thing left is to show, that $f(W_0(w\cdot e^1)+1)$ is a minimum:
Note that the Lambert W function $W(x)$ has a unique value $W_0(x)$ for $x\ge0$ (which is the case with our $x=w\cdot e^1$). For $x<0$ there are two branches $W_0(x)$ and $W_1(x)$.