Localization commutes with Hom for finitely presented modules I am trying to solve an exercise given in Vakil's Algebraic Geometry notes. Suppose $M$ is a finitely presented $A$-module. The $M$ fits inside an exact sequence $A^q\rightarrow A^p\rightarrow M\rightarrow 0$. I'd like to understand why in this case we get an isomorphism $S^{-1}\text{Hom}_A(M,N)\cong \text{Hom}_{S^{-1}A}(S^{-1}M,S^{-1}M)$. This problem is towards the beginning of the book, so in particular there should be a way to solve it without heavy duty commutative algebra.
So far, I've only come up with the following: We can use the universal property of localization of modules so that for any map from $\text{Hom}_A(M,N)$ to $\text{Hom}_{S^{-1}A} (S^{-1}M,S^{-1}M)$ (in which the elements of $S$ are invertible), there exists a unique map from  $S^{-1}\text{Hom}_A(M,N)$ to $\text{Hom}_{S^{-1}A}(S^{-1}M,S^{-1}M)$.
However, what should this map explicitly be? Is this the way to go about showing these two are isomorphic?
EDIT: There is a question about the same problem, but I am specifically asking about how to construct a map between the two sets. The solution in the related question uses facts about flat modules which I am trying to eschew.

As $S^{-1}$ is a functor we have a map
$$\mathrm{Hom}_A(M,N)\rightarrow \mathrm{Hom}_{S^{-1}A}(S^{-1}M,S^{-1}N)$$
and as multiplication by an element $s\in S$ gives an isomorphism in the module $\mathrm{Hom}_{S^{-1}A}(S^{-1}M,S^{-1}N)$ this map extends to a map
$$\tag{$\star$} S^{-1}\mathrm{Hom}_A(M,N)\rightarrow \mathrm{Hom}_{S^{-1}A}(S^{-1}M,S^{-1}N)$$
Now you have that

*

*The map ($\star$) is an isomorphism for $M=A$. More generally, it is an isomorphism for $M=A^n$.

*The map ($\star$) is natural in $M$, in particular if we take an exact sequence $$A^q\rightarrow A^p\rightarrow M\rightarrow 0.$$
Then we get a diagram
$$\begin{array}{c} 0 &\rightarrow & S^{-1}\mathrm{Hom}_A(M,N) & \rightarrow & S^{-1}\mathrm{Hom}_A(A^p,N) & \rightarrow & S^{-1}\mathrm{Hom}_A(A^q,N)\\ &&\downarrow && \downarrow && \downarrow\\ 0 &\rightarrow &  \mathrm{Hom}_{S^{-1}A}(S^{-1}M,S^{-1}N) & \rightarrow & \mathrm{Hom}_{S^{-1}A}(S^{-1}A^p,S^{-1}N) & \rightarrow & \mathrm{Hom}_{S^{-1}A}(S^{-1}A^q,S^{-1}N) \end{array}$$
By the previous point the maps on the 3rd and 4th columns are isomorphism. Hence by Five Lemma the map in the second column is an isomorphism and we finish.
