Let $f: (X,\mathcal{O}_X) \to (Y, \mathcal{O}_Y)$ be a homomorphism of ringed spaces, and let $\mathcal{F}$ be a module over $\mathcal{O}_X$, $\mathcal{G}$ a module over $\mathcal{O}_Y$. I wonder whether the $\mathcal{O}_Y$-modules $f_*\mathcal{H}om_{\mathcal{O}_X}(f^*\mathcal{G},\mathcal{F})$ and $\mathcal{H}om_{\mathcal{O}_Y}(\mathcal{G},f_*\mathcal{F})$ are isomorphic.
For each open subset $V$ of $Y$, let $U = f^{-1}(V)$. I find that
$$\begin{split} \Gamma(V, f_*\mathcal{H}om_{\mathcal{O}_X}(f^*\mathcal{G},\mathcal{F})) &= \mathrm{Hom}_{\mathcal{O}_X\mid_U}((f^*\mathcal{G})\mid_U,\mathcal{F}\mid_U) \\ &= \mathrm{Hom}_{\mathcal{O}_Y\mid_V}(\mathcal{G}\mid_V,(f_*\mathcal{F})\mid_V) = \Gamma(V, \mathcal{H}om_{\mathcal{O}_Y}(\mathcal{G},f_*\mathcal{F})). \end{split}$$
But I can't show that it is compatible with the restriction map.