Detail in the proof of $f_*\mathcal{H}om_X(f^*\mathcal{N},\mathcal{P}) \cong \mathcal{H}om_Y(\mathcal{N},f_*\mathcal{P})$ $\def\Hom{\operatorname{Hom}}\def\N{\mathcal{N}}\def\P{\mathcal{P}}$
I don't understand the last step of this proof of the isomorphism $f_*\mathcal{H}om_X(f^*\mathcal{N},\mathcal{P}) \cong \mathcal{H}om_Y(\mathcal{N},f_*\mathcal{P})$ (where $f:X\to Y$ is a morphism of ringed spaces, $\mathcal{N}\in\operatorname{Mod}(\mathcal{O}_Y)$ and $\mathcal{P}\in\operatorname{Mod}(\mathcal{O}_X)$). There they claim that the maps on sections, which is given by the adjunction $f^*\dashv f_*$, commute with restrictions due to naturality of the bijection between hom-sets.
What we have to show is that if $V\subset U$ is open, then the following diagram commutes:
$$
\require{AMScd}
\begin{CD}
\Hom_{f^{-1}(U)}\left(f^*\N|_{f^{-1}(U)},\P|_{f^{-1}(U)}\right)@>{\cong}>>\Hom_U\left(\N|_U, f_*\P|_U\right)\\
@V{\text{rest}}VV@VV{\text{rest}}V\\
\Hom_{f^{-1}(V)}\left(f^*\N|_{f^{-1}(V)},\P|_{f^{-1}(V)}\right)@>{\cong}>>\Hom_V\left(\N|_V, f_*\P|_V\right)
\end{CD}
$$
but why so? I know the horizontal maps are natural in $\N$ and in $\P$. That's how the adjunction $f^*\dashv f_*$ is stated. But is seems to me that what we need here is the adjunction to be “natural in $U$,” which is something different.
 A: We can see the adjunction as the pair of functors satisfying the triangle identities, like $f_* \mathcal{F} \to  f_* f^* f_* \mathcal{F} \to f_* \mathcal{F}$ is identity for $\mathcal{F}$ for every sheaf $\mathcal{F}$ on $X$. This amounts to a natural family of maps $f_* \mathcal{F}(U) \to  f_* f^* f_* \mathcal{F}(U) \to f_* \mathcal{F}(U),$ so the same identity hold for restrictions of $\mathcal{F}$ on subsets of $Y$. Thus, we have the same unit and counit and the pair of triangle identities for the pair $(f^*,f_*)$ when regarded as functors between $\operatorname{Mod}(\mathcal{O}_V)$ and $\operatorname{Mod}(\mathcal{O}_{f^{-1}V})$. Moreover, these units and counits for different $V$ restrict to each other as they are natural transformations. Since passing along an adjunction amounts to applying one of the adjoint functors and (pre-)post-composing with the (co-)unit, these passages are also "natural".
A: $
\def\Sh{\operatorname{Sh}}
\def\Set{\mathsf{Set}}
\def\F{\mathcal{F}}
\def\G{\mathcal{G}}
\def\Homs{\mathcal{H}om}
\def\Hom{\operatorname{Hom}}
\def\O{\mathcal{O}}
$
I think I've found a proof. The idea is upgrading the proof of 0096 to hom sheaves (see Lemma 7 below). In the following I will just repeat the proof of each result involved in the proof of 0096, making sure that at each step the maps on sections commute with restrictions.

Lemma 1. Let $X$ be a space, $\F$ be a presheaf of sets over $X$ and $\G$ be a sheaf of sets over $X$. Then the hom presheaf $\Homs(\F,\G)$ is actually a sheaf.

Proof. It is given here. Note that even though the lemma is stated there for $\F$ a sheaf, actually the proof does not use that $\F$ is a sheaf at any point. The proof only uses the sheaf condition for $\G$. $\square$
The usual universal property for the sheafification upgrades to a sheaf isomorphism.

Lemma 2. Let $X$ be a space, $\F$ be a presheaf of sets over $X$ and $\G$ be a sheaf of sets over $X$. Then we have a natural isomorphism of sheaves
$$
\Homs(\F,\G)\cong\Homs(\F^\#,\G),
$$
where $(-)^\#$ denotes sheafification.

Proof. The map on sections is given by the universal property of the sheafification,
$$
\Homs(\F,\G)(U)=\Hom(\F|_U,\G|_U)
\xrightarrow{\cong}\Hom(\F^\#|_U,\G|_U)=\Homs(\F^\#,\G)(U)
$$
(where we have used the fact that sheafification commutes with restriction). The fact that these maps commute with restrictions is because how these maps work: from a morphism $\varphi:\F\to\G$ we get a morphism $\varphi^\#:\F^\#\to\G$ which sends the section $(s_x)_{x\in U}$ of $\F^\#$ over $U$ (where $s_x\in\mathcal{F}_x$) to the section $(\varphi_x(s_x))_{x\in U}$ of $\G$ over $U$. So from this description we deduce $\varphi^\#|_U=(\varphi|_U)^\#$. $\square$

Corollary 3. Let $X$ be a space. Let $\O$ be a presheaf of rings over $X$. Let $\F$ be a presheaf of $\O$-modules. Let $\G$ be a sheaf of $\O^\#$-modules. Then we have a natural isomorphism of sheaves
$$
\Homs_{\O}(\F,\G)\cong\Homs_{\O^\#}(\F^\#,\G).
$$

Proof. It follows from last lemma in combination with Lemma 0089 and the adjunction explained after its proof. $\square$

Lemma 4. Let $f:X\to Y$ be a continuous map between spaces and let $\F\in\Sh_\Set(X)$ and $\G\in\Sh_\Set(Y)$ be sheaves of sets over $X$ and over $Y$, respectively. Then there is a natural isomorphism of sheaves
$$
f_*\Homs_X(f^{-1}\mathcal{G},\mathcal{F})\cong\Homs_Y(\G,f_*\F).
$$

Proof. By Lemma 2,
$$
\Homs_X(f^{-1}\G,\F)\cong\Homs_X(f_p\G,\F),
$$
where $f_p\G$ is the presheaf from which $\G$ comes (see 008F for example). Therefore
\begin{align*}
f_*\Homs_X(f^{-1}\G,\F)
\cong f_*\Homs_X(f_p\G,\F).
\end{align*}
We shall prove that the latter is isomorphic to $\Homs_Y(\G,f_*\F)$. Let $V\subset Y$ be open and call $U=f^{-1}(V)$. We have
\begin{align*}
f_*\Homs_X(f_p\G,\F)(V)
&=\Hom_{U}(f_p\G|_{U},\F|_{U})\\
&=\Hom_{U}((f|_{U})_p(\G|_V),\F|_{U})\\
&\cong\Hom_V(\G|_V,(f|_{U})_*(\F|_{U}))\\
&=\Hom_V(\G|_V,f_*\F|_V)\\
&=\Homs_Y(\G,f_*\F)(V).
\end{align*}
This gives the map on sections of our candidate for an isomorphism
$$
f_*\Homs_X(f_p\mathcal{G},\mathcal{F})\cong\Homs_Y(\G,f_*\F).
$$
It is left to justify why do these maps commute with restrictions. This is by the way the adjunction $f^{-1}\dashv f_*$ works. The data in point (4) of 008K clearly commutes with restrictions. $\square$
We upgrade 008Y to hom sheaves.

Corollary 5. Let $f:X\to Y$ be a continuous map of spaces. Let $\mathcal{O}$ be a sheaf of rings on $Y$. Let $\G$ be a sheaf of $\O$-modules. Let $\F$ be a sheaf of $f^{-1}\O$-modules. There is a natural sheaf isomorphism
$$
f_*\Homs_{f^{-1}\O}(f^{-1}\G,\F)\cong\Homs_\O(\G,f_*\F).
$$
Here we use lemmas 008W and 008X, and we think of $f_*\mathcal{F}$ as an $\O$-module by restriction of scalars via $\O\to f_*f^{-1}\O$.

Proof. By Corollary 3,
$$
\Homs_{f^{-1}\O}(f^{-1}\G,\F)\cong\Homs_{f_p\O}(f_p\G,\F).
$$
Therefore
\begin{align*}
f_*\Homs_{f^{-1}\O}(f^{-1}\G,\F)
&\cong f_*\Homs_{f_p\O}(f_p\G,\F)\\
&\cong\Homs_\O(\G,f_*\F),
\end{align*}
where we have used the hom sheaf upgrade of Lemma 008U, which follows in combination with the isomorphism $f_*\Homs_X(f_p\mathcal{G},\mathcal{F})\cong\Homs_Y(\G,f_*\F)$ in the proof of Lemma 4. $\square$
Next, we are going to upgrade 008A to the hom sheaf.

Lemma 6. Let $X$ be a topological space, and let $\mathcal{O}_1\to\mathcal{O}_2$ be a morphism of sheaves of rings over $X$. Let $\F$ be a sheaf of $\O_2$-modules, and let $\G$ be a sheaf of $\O_1$-modules. There is a natural sheaf isomorphism
$$
\Homs_{\O_1}(\G,\F_{\O_1})\cong\Homs_{\O_2}(\O_2\otimes_{\O_1}\G,\F),
$$
where by $\F_{\O_1}$ we mean $\F$ considered as an $\O_1$-module via $\O_1\to\O_2$.

Proof. By Lemma 2, we have
$$
\Homs_{\O_2}(\O_2\otimes_{p,\O_1}\G,\F)\cong \Homs_{\O_2}(\O_2\otimes_{\O_1}\G,\F),
$$
where we are using the notation $\O_2\otimes_{p,\O_1}\G$ for the tensor product presheaf, as defined in 0088. We shall show that the former is isomorphic to $\Homs_{\O_1}(\G,\F_{\O_1})$. The isomorphism
$$
\Homs_{\O_1}(\G,\F_{\O_1})\cong\Homs_{\O_2}(\O_2\otimes_{p,\O_1}\G,\F)
$$
on global sections sends an $\O_1$-module morphism $\varphi:\G\to\F_{\O_1}$ to the $\O_2$-module morphism $\O_2\otimes_{p,\O_1}\G\to\F$ which sends a section $\lambda\otimes s$ of $\O_2\otimes_{p,\O_1}\G$ over $U\subset X$ (where $\lambda\in\O_2(U)$, $s\in\G(U)$) to the section $\lambda\varphi_U(s)$ of $\F$ over $U$. This assignment on global sections is bijective by the extension/restriction of scalars adjunction of commutative algebra, for modules over commutative rings.
The map on sections
$$
\Homs_{\O_1}(\G,\F_{\O_1})(U)
=\Hom_{\O_1|_U}(\G|_U,(\F|_U)_{\O_1|_U})
\xrightarrow{\cong}\Hom_{\O_2|_U}(\O_2|_U\otimes_{p,\O_1|_U}\G|_U,\F|_U)
=\Homs_{\O_2}(\O_2\otimes_{p,\O_1}\G,\F)(U)
$$
is analogously defined.
These maps clearly commutes with restrictions, since the formula $(\lambda\otimes s)|_W=\lambda|_W\otimes s|_W$ holds. $\square$
We can finally state and prove the upgrade of Lemma 0096 to the sheaf hom.

Lemma 7. Let $f:X\to Y$ be a morphism of ringed spaces. Let $\F$ be a sheaf of $\O_X$-modules. Let $\G$ be a sheaf of $\O_Y$-modules. There is a natural sheaf isomorphism
$$
f_*\Homs_{\O_X}(f^*\F,\G)
\cong \Homs_{\O_Y}(\F,f_*\G).
$$

Proof. It follows from the work we did before:
\begin{align*}
f_*\Homs_{\O_X}(f^*\F,\G)
&=f_*\Homs_{\O_X}(\O_X\otimes_{f^{-1}\O_Y}f^{-1}\G,\F)\\
&=f_*\Homs_{f^{-1}\O_Y}(f^{-1}\G,\F_{f^{-1}\O_Y}),
&\text{by Lemma 6,}\\
&=\Homs_{\O_Y}(\G,f_*\F),
&\text{by Corollary 5.}&\quad\square
\end{align*}
