Let $X \hookrightarrow \mathbb{P}^{n}_k$ be a closed subscheme with $k$ an algebraically closed field. Then, the line bundle $\mathcal{O}(1)$ on $\mathbb{P}^n_k$ pulls back to $\mathscr{L} = \mathcal{O}_X(1)$ which is generated by the global sections $x_0, \dots, x_n$. Let $P$ and $Q$ be closed points and suppose $s = \sum a_i x_i$ defines a hyperplane containing $P$ and not $Q$.
Then, $s$ defines a global section of $\mathscr{L}$ and I would like to show that $s \in \mathfrak{m}_P \mathscr{L}_P$ and $s \notin \mathfrak{m}_Q \mathscr{L}_Q$. I do not see how to prove this although it seems intuitive.
For context, this is the situation in Hartshorne's proof of Proposition II.7.3. Please let me know if you need me to clarify any notation.
My Attempt:
I'll let $I$ be the homogenous ideal of $X$. Then $(\mathcal{O}_X)_{P} = \left(k[x_0, \dots, x_n]/I \right)_{(\mathfrak{p})}$ where $\mathfrak{p} = \langle P_ix_j - P_Jx_i\rangle$ is the ideal of the closed point $P = [P_0: P_1: \cdots : P_n]$, since $k$ is algebraically closed. Then, $\mathfrak{m}_P$ is the extension of this ideal in the degree 0 localization $\left(k[x_0, \dots, x_n]/I \right)_{(\mathfrak{p})}$. Then, we know that $\sum a_i P_i =0$. I'm then confused how to write $\sum a_ix_i$ as a product of elements of $\mathfrak{m}_P$ and $\mathscr{L}_P$.
Any help is greatly appreciated.
Let $f$ be a linear form with $P,Q\in D(f)$. The sections of $\mathcal{O}_{\Bbb P^n}(1)$ over $D(f)$ are $f\cdot k[\frac{x_0}{f},\cdots,\frac{x_n}{f}]$, so the sections of $\mathscr{L}$ over $X\cap D(f)$ are $f\cdot k[\frac{x_0}{f},\cdots,\frac{x_n}{f}]/I_X$. Next, $s$ vanishes at $P$ iff $s=f\cdot\frac{s}{f}=f\cdot \sum a_i\frac{x_i}{f}$ also vanishes at $P$. Going to stalks, $f\in\mathscr{L}_P$ and $\frac{s}{f}\in\mathfrak{m}_P$, so $s\in \mathfrak{m}_P\mathscr{L}_P$ iff $s$ vanishes at $P$. The claim for $Q$ is proved in exactly the same manner.