Consider the problem max f(x,y)=(1/2)x-y

Consider the problem
$$max \ f(x,y)=\left(\frac12\right)x-y$$

$$subject \ to \ x +e^{-x} \leqslant y$$ $$x\geqslant0$$

-
Well, assuming what is given, $f(x,y) \le \frac12x-x-e^{-x}$, so for a fixed $x$, the choice $y:=x+e^{-x}$ is the best in maximizing $f$.
Then, you are left with only one variable, and should maximize this $g(x):=-\frac12x-e^{-x}$ whence $x\ge 0$. Possible maximum place is at the edge ($x=0$) or when the tangent of $g$ is horizontal, i.e. where $g'=0$.