I'm trying to prove this statement in Hartshorne's book:

MY ATTEMPT
Injectivity part
If $\varphi$ is an isomorphism, then $\varphi_U$ is an isomorphism of abelian groups for every open subset of $U$
So for $s\in F(U)$ and $t\in F(V)$, with $p\in U$ and $p\in V$, we have
$\varphi_p(s_p)=\varphi _p(t_p)\implies (\varphi_U(s))_p=(\varphi_V(t))_p$
where $\varphi_U(s)\in G(U)$ and $\varphi_V(t)\in G(V)$
Then there is an open subset $W\subset X$ such that $W\subset U\cap V$ and $\varphi_U(s)_{|W}=\varphi_V(t)_{|W}$.
I can't see why this implies $s_p=t_p$.
I need help.
Thanks a lot.
From $\phi_U(s)|_W = \phi_V(t)|_W$ we can conclude $\phi_W(s|_W) = \phi_W(t|_W)$, hence $s|_W = t|_W$ and $s_p = t_p$.
Instead of showing by hand that an isomorphism induces isomorphisms on stalks, observe that the formation of stalks is a functor, and it is trivial that every functor maps isomorphisms to isomorphisms.