There is a step in 3.5.3 of Hartshorne that I am stuck at.
The setup is this: Let $\mathcal{F}$ be a coherent sheaf on a scheme $X$ which is proper over $\text{Spec}(A)$ for a noetherian ring $A$. Let $\mathcal{L}$ be an invertible sheaf on $X$. Let $P$ be a closed point of $X$ and let $\mathcal{I}_P$ be the ideal sheaf of the closed subset $\{P\}$. Let $\mathcal{F'}= \mathcal{F} \otimes \mathcal{L}^n$, $k(P)= \mathcal{O}_X/\mathcal{I}_P$.
Suppose that $H^0(\mathcal{F'})\to H^0(\mathcal{F'}\otimes k(P))$ is surjective. The claim is that there exists $s_i\in H^0(\mathcal{F'})$ such that the images of the $s_i$ in $\mathcal{F'_P}$ generate $\mathcal{F'_P}$ as an $\mathcal{O}_{X,P}$-module.
Hartshorne says this is by Nakayama's lemma over the local ring $\mathcal{O}_{X,P}$.
What I have tried:
I know that $k(P)$ has the property that it's stalk at $P$ is $\mathcal{O}_{X,P}/\mathfrak{m}$, where $\mathfrak{m}$ is the max ideal of $\mathcal{O}_{X,P}$. So the stalk of $\mathcal{F'}\otimes k(P)$ at $P$ is of the form $M/\mathfrak{m}M$ with $M$ being the stalk of $\mathcal{F'}$ at $P$. Now it looks like Nakayama would be useful, but I do not see how to use it here. Furthermore, I cannot see where surjectivity of global sections comes into play.
I have also tried to prove it in the case where $X=\text{Spec}(R)$ is affine, since then I can write $\mathcal{F'}$ as $\widetilde{M}$ for some finitely generated $R$-module $M$. Also, this affine case originally appealed to me because I have explicitly calculated what $\mathcal{I}_P$ is in this case.
I know that the surjectivity of global sections gives a surjection between germs of global sections.
Finally, I wanted to add that for my question I do not think $X$ proper over $A$ matters, nor do I think the presence of $\mathcal{L}$ matters. This is why I have used the notation $\mathcal{F'}$.
I agree that $A$ and $\mathscr{L}$ don't play any role in this step.
I think the version of Nakayama you want to use is the following: $(A, \mathfrak{m})$ is a local ring and $M$ is a finitely generated $A$-module. If the images of $x_1, \dots, x_r \in M$ in $M/\mathfrak{m}M$ form a set of generators over $A/\mathfrak{m}$ then $x_1, \dots, x_r$ generate $M$ over $A$. This is version 4 on Wikipedia.
In this case, $A = \mathscr{O}_{X, P}$, $M = \mathscr{F}'_P$, and $x_i = (s_i)_P$. Here the $s_i$ are global sections of $\mathscr{F}'$ whose images in $\mathscr{F}' \otimes k(P)$ generate.