Suppose $M$ is $\Bbb Z$-module, cyclic, finite. How to prove $\require{AMScd}$ \begin{CD} 0 @>>> \Bbb Z @>>> \Bbb Z @>>> M @>>>0\\ \end{CD} is short exact sequence?
in fact we must prove : $\require{AMScd}$ \begin{CD} 0 @>f>> \Bbb Z @>g>> \Bbb Z @>h>> M @>k>>0\\ \end{CD} $f,g,h,k$ exist s.t. $Im f=Kerg, Img=Kerh,Imh=Kerk$
in other way: $g,h$ exist s.t $g$ is one-one function,$h$ is onto function, $Img=Kerh$
if $g=i$ ,$g$ is one-one function, $h=?$,$M=a \Bbb Z$, $h$ is onto but $Img\not =Kerh$
You probably want to prove that
Let $x$ be a generator of $M$ and consider the map $f\colon\mathbb{Z}\to M$ defined by $f(n)=nx$. This is a surjective homomorphism and its kernel is of the form $\ker f=k\mathbb{Z}$, with $k>0$.
Consider now the map $\mu_k\colon\mathbb{Z}\to\mathbb{Z}$ defined by $\mu_k(n)=nk$.
Is the sequence $$ 0\to \mathbb{Z}\xrightarrow{\mu_k}\mathbb{Z}\xrightarrow{f} M\to 0 $$ exact?