Maximum principle for subharmonic functions
Let $\Omega$ be a domain of $\mathbb{R}^n$, and $u:\Omega\to\mathbb{R}$ a continuous function. We call $u$ subharmonic if for any ball $B\subset\subset\Omega$ and any $h:\overline B\to\mathbb{R}$ which is continuous on $\overline B$, harmonic in $B$, and satisfies $u|_{\partial B}\leq h|_{\partial B}$, then $u\leq h$ on the whole $\overline B$. No regularity assumed for $u$, except for continuity.
With that, a subharmonic function should satisfy the maximum principle, the strong one, i.e. if there is $x_0\in\Omega$ for which the maximum on $\overline\Omega$ is $u(x_0)$, then $u$ is constant.
The proof uses a connection argument. Let $\Omega_M=\{x\in\overline\Omega:u(x)=M=u(x_0)\}$. Then $x_0\in\Omega_M$ so $\Omega_M\neq\varnothing$. Also, $\Omega_M$ is closed as $u$ is continuous and $\Omega_M=u^{-1}(\{M\})$ is the preimage of a closed set (a singleton) in the reals. So if it is open, it coincides with $\Omega$, showing the principle holds.
Take $x\in\Omega_M$. Since $x\in\Omega$, we can find $R:B_R(x)\subset\subset\Omega$. Thus, if $h$ is a harmonic function as in the definition of subharmonic, we have $u(x)\leq h(x)$. But then $h(x)\leq\sup_{\partial B}f$, since $h$ is harmonic and thus satisfies the strong maximum principle. So suppose $u=h$ on $\partial B$. Then $u(x)\leq\sup_{\partial B}h=\sup_{\partial B}u$. This means that supremum must be $u(x)$, since $u(x)$ was the maximum of $u$ on the whole of $\Omega$.
Now for all I can tell, this doesn't probe $u$ is constantly $M$ on $\partial B$, as my professor wanted to deduce, but at most that there is a point on that boundary where the maximum $u(x)$ is attained. However, this doesn't allow me to conclude $u$ must be constantly $M$ on that ball, nor the maximum principle.
So how do I complete this proof? How can I conclude $u$ is constant on $\partial B$? Do I need a different path or can I add something to these arguments to conclude?
Note, that there is a function $h \colon \bar B \to \mathbf R$, which is harmonic on $\bar B$ and has $h|_{\partial B} = u$. As $u$ is subharmonic, this implies $u \le h$. Hence, $$ u(x) \le h(x) \le \sup_{\partial B} h = \sup_{\partial B} u = u(x) $$ That is $h(x) = \sup_{\partial B} h$. As $h$ is harmonic on $B$, by the strong maximum principle for harmonic function (which you already proved, I think), we have, that $h$ is constant on $\bar B$, hence, $u$ is constant on $\partial B$, as $h = u$ on $\partial B$.