I have a question on functional analysis, on something rather simple, but I'm stuck for good. Here it is. If $X$ is a Banach space and $M<X$ a closed subspace, define $M^0=\{f\in X^*: f\vert_M=0\}$. It is easy to check that $M^0$ is a closed subspace of $X^*$. I need to show that for $f\in X^*$ it is $$\| f\vert_M\|=\|f+M^0\|=\text{(by def.)}\inf_{g\in M^0}\|f-g\|$$
I've been able to prove that $\|f\vert_M\|\leq\|f+M^0\|$ but the other inequality is driving me crazy. I've been trying to use the Hahn- Banach theorem to extend functionals that are in M$^0$, but I get nothing useful. Any hints or ideas?