Why is $f^!\mathcal{G}$ a quasi-coherent $\mathcal{O}_X$-module? Consider Proposition 6.4.25 in Qing Liu - Algebraic Geometry and Arithmetic Curves where we have:

Let $f:X \rightarrow Y$ be a finite morphism of locally Noetherian schemes. Let $\mathcal{F}$ (resp. $\mathcal{G}$) be a quasi-coherent sheaf on $X$ (resp. on $Y$). Let us set $f^!\mathcal{G} = \mathcal{H}\text{om}_{\mathcal{O}_Y}(f_*\mathcal{O}_X,\mathcal{G})$.
  After this the statements follow...

Then we obtain by the Lemma before the above proposition that $f^!\mathcal{G}$ is a $f_*\mathcal{O}_X$-module. But the author then says that it is canonically endowed with the structure of an $\mathcal{O}_X$-module $-$ I don't see that.
Could you explain me why?
 A: The basic idea is to take an affine cover $Y = \bigcup_{i} U_i$ and consider the induced affine cover $X = \bigcup_i V_i$ where $V_i = f^{-1}(U_i)$ (this only uses the affiness of $f$). Set $R_i = \mathcal{O}_X(V_i)$ and $S_i = \mathcal{O}_Y(U_i)$. We define for all $i$ an $R_i$-module $M_i$ by

$$M_i =\operatorname{Hom}_{S_i}(R_i,S_i),\quad  (s\cdot \phi)(r) := \phi(sr)\quad \forall\,r,s \in R_i,\forall\,\phi \in M_i. $$

I claim that these modules on the affine cover of $X$ will glue together to a quasi-coherent sheaf $\mathcal{F}$ such that $\mathcal{F}_{\mid V_i} \cong \widetilde{M}_i$. To do so, I need to show that the quasi-coherent sheaves $\widetilde{M}_i$ and $\widetilde{M}_j$ agree on the overlaps $V_{ij} := V_i \cap V_j$.

We will proceed as follows: We will cover $V_{ij}$ with open subsets which are distinguished open subsets in both $V_i$ and $V_j$ and then show that the restrictions of $M_i$ and $M_j$ at these open subsets are isomorphic. But these restrictions are given by localizations of the modules $M_i$ and hence we need to analyze how localizations of $M_i$ looks like first.
Let $M := M_i$, $R := R_i$ and $S := S_i$ for some $i$. Let $h \in R$ be the image of some $g \in S$ under $f^*(U_i)(g)$, where $f^*(U): \mathcal{O}_Y(U) \rightarrow \mathcal{O}_X(f^{-1}(U))$ for open $U \subset Y$.
What does the localization $M_h$ look like? We can write it as
$$ M_h \cong M \otimes_R R_h $$
and now the scalar multiplication of $M$ over $R$ kind of prescribes that the denominators will get drawn into the argument of any $\phi \in M$, and we are facing the task to map such denominators. The canonical approach should be
$$ (r \mapsto \phi(r)) \mapsto ( (r/h^n) \mapsto \phi(r)/g^n) $$
which should induce an isomorphism
$$ M \otimes_R R_h \cong \operatorname{Hom}_{S_g}(R_h,S_g). \quad \quad (*) $$
I have to admit that I don't see how to give a concrete isomorphism of the localization at some $h \in R$ which is not induced by a function $g\in S$.

Thus to continue the proof correctly, I need to cover $V_{ij}$ by distinguished open subsets given by such $h$, but this is possible:
It is a basic fact, that the intersection $U_{ij} = U_i \cap U_j$ of two open affine subsets can be covered by open subsets which are distinguished open subsets in both $U_i$ and $U_j$: Thus there are $g_{i\ell} \in \mathcal{O}_Y(U_i)$ and $g_{j\ell} \in \mathcal{O}_Y(U_j)$ such that
$$ U_{ij} = \bigcup_{\ell} D(g_{i\ell}) = \bigcup_{\ell} D(g_{j\ell}) \quad \text{ and } \quad D(g_{i\ell}) = D(g_{j\ell}) \text{ for all } \ell. $$
Now since any preimage of a set is covered by the preimages of a cover of the image and further since the preimage of a basic open subset is again basic open, we obtain
$$
 V_{ij} = \bigcup_\ell D(f^*(U_i)(g_{i\ell})) = \bigcup_\ell D(f^*(U_j)(g_{j\ell})) \quad \text{and} \quad D(f^*(U_i)(g_{i\ell})) = D(f^*(U_i)(g_{j\ell})).
$$
Now denote $h_{k\ell} = f^*(U_k)(g_{k\ell})$. It is left to show that
$$ (M_i)_{h_{i\ell}} \cong (M_j)_{h_{j\ell}} \quad \forall\, \ell. $$
But this now follows easily with $(*)$ since ${\mathcal{O}_X}_{\mid D(h_{i\ell})} = {\mathcal{O}_X}_{\mid D(h_{j\ell})}$ and
${\mathcal{O}_Y}_{\mid D(g_{i\ell})} = {\mathcal{O}_Y}_{\mid D(g_{j\ell})}$ (which is obvious since the open subsets in question concide by construction).
