Suppose $f\in C(\bar{U})$ and $g\in C(\partial U)$ and that $u\in C^2(U)\cap C(\bar{U})$ satisfies $$\begin{cases} -\Delta u &= f \ \ \text{in} \ U\\ u &= g \ \ \text{on} \ \partial U\\ \end{cases}$$ Show that there exists a constant $C$ which depends only on the region $U$ such that $$\max_{x\in \bar{U}}|u(x)|\leq C\left(\max_{x\in \partial U}|g(x)| + \max_{x\in \bar{U}}|f(x)| \right)$$
Attempted proof - Let $\lambda = \max_{x\in \bar{U}}|f(x)|$, and define $v(x) := u(x) + \frac{\lambda}{2N}|x|^2$. We have $$-\Delta = f - \lambda = f - \max_{x\in \bar{U}}|f| \leq 0$$
Before I continue I want to mention that my professor started this problem out for us but I do not understand that part where $-\Delta v = f - \lambda$ I understand where the $f$ comes in but not the $\lambda$ it seems that the $\frac{1}{2N}|x|^2$ term disappeared. Does that occur becomes where we take the partial derivative with respect to $x$ twice we are left with just $\frac{1}{N}$ which is just a constant so we ignore it? Once I understand this part I will post another attempted proof to finish it off.
We compute $$-\Delta v = -\Delta u - \frac{\lambda}{2N}\Delta(|x|^2) = f - \frac{\lambda}{2N}\sum_{i=1}^{N}\frac{\partial^2|x|^2}{\partial x_i^2}=f - \frac{\lambda}{2N}\sum_{i=1}^{N}2=f-\lambda,$$ the second to last equality comes from the fact that $|x|^2 = \sum_{i=1}^{N}x_i^2$ and so $\partial_i(|x|^2)=2x_i$ and $\partial_{ii}(|x|^2)=2.$ I hope that clarifies your confusion.