I attempted to prove Hartshorne, Proposition 2.2, which is
Proposition. Let $(X,\mathcal{O}_X)$ be a ringed space. Then the category of $\mathcal{O}_X$-modules has enough injectives.
Pick some arbitrary $x \in X$ and let $j : \{x\} \to X$ be the inclusion map. The Hartshorne proof uses the fact that $$\text{Hom}_{\mathcal{O}_X}(\mathcal{G},j_*(I_x)) \simeq \text{Hom}_{\mathcal{O}_{x,X}}(\mathcal{G}_x,I_x)$$ for any $\mathcal{O}_X$-module $\mathcal{G}$ and an injective $\mathcal{O}_{x,X}$-module $I_x$ where $\mathcal{G}_x \hookrightarrow I_x$, and notes that one can 'see easily' this fact. This was not the case for me, so here is my attempted proof:
Suppose we have $\phi \in \text{Hom}_{\mathcal{O}_X}(\mathcal{G}, j_*(I_x))$. We may send $\phi$ to $\phi_x$, the induced morphism on the stalks. Conversely, if we are given $\phi_x : \mathcal{G}_x \to I_X$, notice that $j_*(I_x)(U) = I_x$ for any neighborhood $U$ containing $x$. Therefore, if we denote as $p_U$ the projection map $\mathcal{G}(U) \to \mathcal{G}_x$, then we may lift $\phi_x$ to $\phi_x\circ p_U$ and define $\phi_U = \phi_x\circ p_U$ whenever $x \in U$, and $0$ otherwise. This defines a morphism of sheaves $\mathcal{G} \to j_*(I_x)$.
I am yet to show that these two directions are inverses, but is my approach valid? Is there something that I'm missing that is making this overly complicated?