Map of coherent sheaves inducing isomorphism on the stalks at the generic point

I think this can also be solved by taking the "coherent subsheaf generated by finitely many global sections of $i_* \mathcal{O}_U$". I'm not sure this is fundamentally different from Aknazar's solution, but it avoids the direct mention of (co)limits, and might be what Hartshorne had in mind.

As Aknazar, suppose we can solve the problem for affine schemes, and choose an open affine $j: V \hookrightarrow Y$ and let $i: U \hookrightarrow X$ be its preimage. Suppose we have a morphism $$ \alpha_V: \mathcal{O}_V^n \to (f|_U)_*\mathcal{O}_U$$ which is an isomorphism at the generic point $\eta$ of $Y$.

The problem is that $i_* \mathcal{O}$ is not in general coherent on $X$. But $\alpha_V$ chooses $n$ global sections $s_1,\dotsc,s_n \in \Gamma(X, i_* \mathcal{O}_U) = \Gamma(U, \mathcal{O}_U)$, which can be used to define a morphism $\alpha_X: \mathcal{O}_X^n \to i_* \mathcal{O}_U$. Let $\mathscr{G}$ be the image of this morphism. Then $\mathscr{G}$ is coherent, because for every open affine $\text{Spec }A = W \subset X$, $\mathscr{G}(W) \subset (i_*\mathcal{O}_U)(W)$ is the $A$-submodule generated by $s_1|_W,\dotsc,s_n|_W$.

This allows us to define the morphism $$ \alpha_Y: \mathcal{O}_Y^n \to f_* \mathscr{G} \subset (f i)_* \mathcal{O}_U$$ by takting the same global sections $s_1,\dots,s_n \in \Gamma(Y, f_* \mathscr{G})$. At the generic point this yields $$ \mathcal{O}^n_{Y, \eta} \xrightarrow{\alpha_{Y, \eta}} (f_*\mathscr{G})_\eta \hookrightarrow ((fi)_* \mathcal{O}_U)_\eta, $$ and the composition is $\alpha_{U, \eta}$ which is an isomorphism. Hence $\alpha_{Y, \eta}$ is an isomorphism as well.