I'm trying to solve below exercise, i.e.,
Let $E := \mathbb R^n, P := \{x \in E \mid x_i \ge 0 \quad \forall i = 1, \ldots, n\}$, and $M$ be a linear subspace of $E$ such that $M \cap P = \{0\}$. Then there is some hyperplane $H$ such that $M \subset H$ and $H \cap P = \{0\}$.
Could you please have a check on my attempt?
My attempt: Notice that $M^\perp$ is a closed vector subspace, $(M^\perp)^\perp = \overline M = M$, and $\operatorname{int} P = \{x \in E \mid x_i > 0 \quad \forall i = 1, \ldots, n\}$.
First, we prove that $M^\perp \cap (\operatorname{int} P) \neq \emptyset$. Assume the contrary that $M^\perp \cap (\operatorname{int} P) = \emptyset$. Then by this version of Hahn-Banach theorem, there is $a \in E \setminus \{0\}$ such that $$ \langle a, x \rangle \le \langle a, y \rangle \quad \forall x \in M^\perp, y \in P. $$
It follows that $\langle a, x \rangle =0$ for all $x\in M^\perp$ and thus $a \in M$. Also, $\langle a, y \rangle \ge 0$ for all $y\in P$, so $a \in P$. Hence $a \in P \cap M$, which is a contradiction. Hence there is $a \in M^\perp \cap (\operatorname{int} P)$. Then $a_i >0$ for all $i=1, \ldots, n$.
We define $f \in E^*$ by $f(x) := \langle a, x\rangle$ for all $x\in E$. Then $M \subset \ker f$. Clearly, $f(x)>0$ for all $x \in P \setminus \{0\}$. Then $H := \ker f$ is the required hyperplane.