tensor product of sheaves commutes with inverse image

Let $f : X \to Y$ be a morphism of ringed spaces and $\mathcal{M}$, $\mathcal{N}$ sheaves of $\mathcal{O}_Y$-modules. Then one has a canonical isomorphism $f^*(\mathcal{M} \otimes_{\mathcal{O}_Y} \mathcal{N}) \cong f^*\mathcal{M} \otimes_{\mathcal{O}_X} f^*\mathcal{N}$, but I cannot find a proof in any of the standard references. The problem is that the definitions of the functors $f^*$ and $\otimes$ are so cumbersome that I cannot even write down a map between these two sheaves. Surely there is a nice way to do this: to give you an idea of what I mean by "nice," I am the type of person who likes to define such functors as adjoints to some less complicated functor, prove that they exist, and then forget the construction.


I figured it out: let $\mathcal{P}$ be a sheaf of $\mathcal{O}_X$-modules. It is easy to check from the definition of $\mathscr{H}om$ and the adjointness of $f^*$ and $f_*$ that $f_*\mathscr{H}om(f^*\mathcal{N},\mathcal{P}) \cong \mathscr{H}om(\mathcal{N},f_*\mathcal{P})$, and then we see that

\begin{align*} \text{Hom}(f^*\mathcal{M} \otimes_{\mathcal{O}_X} f^*\mathcal{N},\mathcal{P}) &\cong \text{Hom}(\mathcal{M},f_*\mathscr{H}om(f^*\mathcal{N},\mathcal{P}))\\ &\cong \text{Hom}(\mathcal{M},\mathscr{H}om(\mathcal{N},f_*\mathcal{P}))\\ &\cong \text{Hom}(f^*(\mathcal{M} \otimes_{\mathcal{O}_Y} \mathcal{N}),\mathcal{P}) \end{align*}

So $f^*\mathcal{M} \otimes_{\mathcal{O}_X} f^*\mathcal{N}$ and $f^*(\mathcal{M} \otimes_{\mathcal{O}_Y} \mathcal{N})$ represent the same functor, whence they are canonically isomorphic.