Let $(X,\mathcal{O}_X)$ be a ringed space, and let $\mathcal{F}$ and $\mathcal{G}$ be $\mathcal{O}_X$-modules. Then, we can define an $\mathcal{O}_X$-module by $$ \mathcal{Hom}(\mathcal{F},\mathcal{G})\quad :\quad U \longmapsto \mathrm{Hom}_{\mathcal{O}_X}(\mathcal{F}|_U, \mathcal{G}|_U), $$ where $\mathrm{Hom}_{\mathcal{O}_X}$ is the set of $\mathcal{O}_X$-module homomorphisms. The $\mathcal{O}_X$-module is called the sheaf hom of $\mathcal{F}$ and $\mathcal{G}$.
If a sequence of $\mathcal{O}_X$-modules $$\mathcal{F}_1 \xrightarrow{f} \mathcal{F}_2 \xrightarrow{g} \mathcal{F}_3\to 0 \quad\quad(\natural)$$ is exact, then the sequence $$ 0\to\mathcal{Hom}(\mathcal{F}_3,\mathcal{G}) \xrightarrow{g^*} \mathcal{Hom}(\mathcal{F}_2,\mathcal{G}) \xrightarrow{f^*} \mathcal{Hom}(\mathcal{F}_1,\mathcal{G}) \quad\quad(\ast)$$ is exact as $\mathcal{O}_X$-modules.
Why does the euqality $\mathrm{Im}(g^{\ast})=\mathrm{Ker}(f^{\ast})$ in the sequence $(\ast)$ hold?
Since $g\circ f=0$, it is clear that the image of $g^{\ast}$ is contained in the kernel of $f^{\ast}$. I want to show the converse. By exactness of $(\natural)$, we have the exact sequence of stalks at any point $x\in X$ $$ \mathcal{F}_{1,x} \xrightarrow{f_x} \mathcal{F}_{2,x} \xrightarrow{g_x} \mathcal{F}_{3,x}\to 0. $$ If $\phi_x\in \mathrm{Ker}(f^{\ast}_x)$, there uniquely exists $\psi:\mathcal{F}_{3,x}\to \mathcal{G}_x$ such that $\phi_x=\psi\circ g_x$ since $\phi_x\circ f_x=0$.
How do we show that $\psi\in\mathcal{Hom}(\mathcal{F_3,\mathcal{G}})_x$?
Thank you.
It is enough to show that the sequence $(\ast)$ is exact on sections, i.e. that for every open $U$ of $X$, the sequence $$ 0\to \operatorname{Hom}_{\mathcal{O}_X|_U}(\mathcal{F}_3|_U,\mathcal{G}|_U)\to \operatorname{Hom}_{\mathcal{O}_X|_U}(\mathcal{F}_2|_U,\mathcal{G}|_U)\to \operatorname{Hom}_{\mathcal{O}_X|_U}(\mathcal{F}_1|_U,\mathcal{G}|_U) $$ is exact. But since restriction to an open is exact, sequence $(\sharp)$ remains exact when restricted to $U$ and exactness of the above sequence is basically the universal property of the cokernel.