Really basic example of Lagrangian duality
Solution 1:
Your optimization problem, $$ \max_\lambda \min_x \ 2x+2+\lambda(-x) \\ s.t \quad \lambda\geq0 $$
Can be seen as, $$ \max_\lambda f(\lambda) \\ s.t \quad \lambda\geq0 $$
Now this $f(\lambda)$, $$ f(\lambda) = \min_x \ 2x+2-\lambda x = \begin{cases} -\inf & \lambda < 2 \\ 2 & \lambda = 2 \\ -\inf & \lambda > 2 \end{cases} $$ Hence optimal value of your function $\max_\lambda f(\lambda)=2$ and $\lambda =2$ is your solution.