I'm reading a proof of generic freeness theorem, which conclude in a series exercise.
https://math.uchicago.edu/~cstaats/Charles_Staats_III/Notes_and_papers_files/generic_freeness.pdf
And now I can't figure out how to solve the last Exercise 4. It seems that for each $n$ by the induction hypothesis, we could find a nonzero $f_n \in A$ such that $(M_{n+1}/M_n)_{f_{n}}$ is free as an $A_{f_{n}}$-module, but how to find a $f \in A$ such that $(M_{n+1}/M_n)_{f}$ is free as $A_f$-module for all $n$?
Thanks for any help in advance.
By exercise 3, we have that $M_n/M_{n-1}\cong M_{n+1}/M_n$ for all $n>n_0$, so it suffices to determine a function $f$ so that $(M_{i+1}/M_i)_f$ is free for some finite number of $i$. This means that it's enough to solve the following problem: given two $R$-modules $M$ and $N$ along with functions $g,h\in R$ so that $M_g$ is free and $N_h$ is free, can we find a function $f$ so that $M_f$ and $N_f$ are both free?
Hint 1:
Hint 2:
Full solution: