Since $M$ is finitely generated, let $x_1, \dots, x_n$ be generators of $M$.
Similarly, let $z_1, \dots, z_m$ be generators of $M^{\prime\prime}$.

The exactness of the sequence (*) yields that the homomorphism $g:M’\to M^{\prime\prime}$ is surjective.
Thus, there exist $y_1, \dots, y_m\in M’$ such that
\[g(y_i)=z_i\]
for $i=1, \dots, m$.

We claim that the elements
\[f(x_1), \dots, f(x_n), y_1, \dots, y_m\]
generate the module $M$.

Let $w$ be an arbitrary element of $M’$. Then $g(w)\in M^{\prime\prime}$ and we can write
\[g(w)=\sum_{i=1}^m r_iz_i\]
for some $r_i\in R$ as $z_i$ generate $M^{\prime\prime}$.
Then we have
\begin{align*}
g(w)&=\sum_{i=1}^m r_iz_i\\
&=\sum_{i=1}^m r_i g(y_i)\\
&=g\left(\, \sum_{i=1}^m r_iy_i \,\right)
\end{align*}
since $g$ is a module homomorphism.

It follows that we have
\begin{align*}
g\left(\, w- \sum_{i=1}^m r_iy_i \,\right)=g(w)-g\left(\, \sum_{i=1}^m r_iy_i \,\right)=0,
\end{align*}
and thus
\[w- \sum_{i=1}^m r_iy_i \in \ker(g).\]

Since the sequence (*) is exact, we have $\ker(g)=\im(f)$.
Hence there exists $x\in M$ such that
\[f(x)=w- \sum_{i=1}^m r_iy_i.\]
Since $x_i$ generate $M$, we can write
\[x=\sum_{i=1}^n s_i x_i\]
for some $s_i\in R$.
Thus, we have
\begin{align*}
w&=f(x)+\sum_{i=1}^m r_iy_i\\
&=f\left(\, \sum_{i=1}^n s_i x_i \,\right)+\sum_{i=1}^m r_iy_i\\
&=\sum_{i=1}^n s_if(x_i)+\sum_{i=1}^m r_iy_i.
\end{align*}

This proves that any element $w\in M’$ can be written as a linear combination of
\[f(x_1), \dots, f(x_n), y_1, \dots, y_m,\]
and we conclude that $M’$ is generated by these elements and thus finitely generated.

Linearly Dependent Module Elements / Module Homomorphism and Linearly Independency
(a) Let $R$ be a commutative ring. If we regard $R$ as a left $R$-module, then prove that any two distinct elements of the module $R$ are linearly dependent.
(b) Let $f: M\to M'$ be a left $R$-module homomorphism. Let $\{x_1, \dots, x_n\}$ be a subset in $M$. Prove that if the set […]

Nilpotent Ideal and Surjective Module Homomorphisms
Let $R$ be a commutative ring and let $I$ be a nilpotent ideal of $R$.
Let $M$ and $N$ be $R$-modules and let $\phi:M\to N$ be an $R$-module homomorphism.
Prove that if the induced homomorphism $\bar{\phi}: M/IM \to N/IN$ is surjective, then $\phi$ is surjective.
[…]

Basic Exercise Problems in Module Theory
Let $R$ be a ring with $1$ and $M$ be a left $R$-module.
(a) Prove that $0_Rm=0_M$ for all $m \in M$.
Here $0_R$ is the zero element in the ring $R$ and $0_M$ is the zero element in the module $M$, that is, the identity element of the additive group $M$.
To simplify the […]

Annihilator of a Submodule is a 2-Sided Ideal of a Ring
Let $R$ be a ring with $1$ and let $M$ be a left $R$-module.
Let $S$ be a subset of $M$. The annihilator of $S$ in $R$ is the subset of the ring $R$ defined to be
\[\Ann_R(S)=\{ r\in R\mid rx=0 \text{ for all } x\in S\}.\]
(If $rx=0, r\in R, x\in S$, then we say $r$ annihilates […]

Submodule Consists of Elements Annihilated by Some Power of an Ideal
Let $R$ be a ring with $1$ and let $M$ be an $R$-module. Let $I$ be an ideal of $R$.
Let $M'$ be the subset of elements $a$ of $M$ that are annihilated by some power $I^k$ of the ideal $I$, where the power $k$ may depend on $a$.
Prove that $M'$ is a submodule of […]

Torsion Submodule, Integral Domain, and Zero Divisors
Let $R$ be a ring with $1$. An element of the $R$-module $M$ is called a torsion element if $rm=0$ for some nonzero element $r\in R$.
The set of torsion elements is denoted
\[\Tor(M)=\{m \in M \mid rm=0 \text{ for some nonzero} r\in R\}.\]
(a) Prove that if $R$ is an […]

Ascending Chain of Submodules and Union of its Submodules
Let $R$ be a ring with $1$. Let $M$ be an $R$-module. Consider an ascending chain
\[N_1 \subset N_2 \subset \cdots\]
of submodules of $M$.
Prove that the union
\[\cup_{i=1}^{\infty} N_i\]
is a submodule of $M$.
Proof.
To simplify the notation, let us […]