I want to Understand a paragraph of the proof of $R/I \otimes_R M \cong_R M/IM.$ in example$(8)$ on pg. 370 of Dummit and Foote (third edition)
Here is the example from Dummit & Foote:
My questions are:
1- I do not understand exactly why we need the previous observation (as stated in the book) to say that the map $N \rightarrow (R/I) \otimes_R N$ defined by $n \mapsto 1 \otimes n$ is surjective?
2-why we need $IN$ to be in the kernel?
3- why $1 \otimes a_i n_i = a_i \otimes n_i$?
4- Why the author defined $f$ by that definition?
Could anyone help me answer those questions please?


It could be a useful exercise for you to prove this for yourself rather than to try to follow the proof (and consequently bear the burden of filling in all of the missing details) from a textbook. Toward this end, allow me to provide you with some suggestions that you can use in your proof.
Observe that by definition, the tensor product gives an $R$-bilinear map $\tau : (R / I) \times M \to (R / I) \otimes_R M$ defined by $\tau(r + I, m) = (r + I) \otimes_R m.$ We will need also an $R$-bilinear map $\varphi : (R / I) \times M \to M/IM.$ Hint: for a module $N$ over a commutative ring $S,$ the multiplication map $S \times N \to N$ that sends $(s, n) \mapsto s \cdot n$ is always bilinear.
Once we have two $R$-bilinear maps $\tau : (R / I) \times M \to (R / I) \otimes_R M$ and $\varphi : (R / I) \times M \to M / IM,$ the universal property of the tensor product gives a unique $R$-bilinear map $\psi : (R / I) \otimes_R M \to M / IM$ such that $\psi \circ \tau = \varphi,$ i.e., we have that $\psi[(r + I) \otimes_R m] = \varphi(r + I, m)$ for all $r + I \in R / I$ and $m \in M.$
Can you find a well-defined $R$-bilinear map $\gamma : M / IM \to (R / I) \otimes_R M$ such that $\psi \circ \gamma$ is the identity map on $M / IM$? Hint: there is a "standard" way to give a map $M \to R \otimes_R M.$ If you mimic this idea, you will find exactly what you are looking for.