This is exercise 4.8(2) in Exercises in modules and rings by T.Y. Lam. We can prove it as follows:
First, observe that since $M, P$ are finitely generated, $N$ is also finitely generated: one can show that if $m_1,\ldots,m_n$ generate $M$ and $p_1,\ldots,p_k$ generate $P$, then $f(m_1),\ldots,f(m_n)$, $g^{-1}(p_1),\ldots, g^{-1}(p_k)$ generate $N$.
Therefore $N\cong R^n/X$ for some $n\in\mathbb{N}$ and some $R$-module $X$. The aim now is to prove that $X$ is finitely generated.
Since $M$ is injected in $N$, there is some $Y\leq R^n$ such that $M\cong Y/X$. Therefore $$P\cong N/M\cong (R^n/X)/(Y/X)\cong R^n/Y.$$
This implies that $Y$ is finitely generated:
We have the exact sequence
$$0\rightarrow Y\rightarrow R^n\rightarrow P\rightarrow 0,$$
but we know that $P$ is finitely presented, so we also have
$$0\rightarrow K\rightarrow R^k\rightarrow P\rightarrow 0$$
with $K$ finitely generated. Since both $R^n$ and $R^k$ are projective, by Schanuel's lemma we get $$R^n\oplus K\cong R^k\oplus Y$$
with $K$ finitely generated, so $Y$ is finitely generated as well.
Now we have an exact sequence for $M$
$$0\rightarrow X\rightarrow Y\overset{\alpha}{\rightarrow} M\rightarrow 0$$
in which $Y$ is finitely generated and $M$ finitely presented. This implies that $X$ is finitely generated:
Since $Y$ is finitely generated, we can consider the short exact sequence
$$0\rightarrow \ker(\alpha\beta)\rightarrow R^k\overset{\alpha\beta}{\rightarrow} M\rightarrow 0$$
where $R^k\overset{\beta}{\rightarrow} Y$. By the same Schanuel's argument as before (since $M$ is finitely presented), this implies $\ker(\alpha\beta)$ is finitely generated, so $\ker(\alpha)\cong X$ is also finitely generated, as $\beta$ is surjective: The map $\ker(\alpha\beta)\rightarrow\ker(\alpha)$ such that $y\mapsto\beta(y)$ is well defined ($\beta(y)\in\ker(\alpha\beta)$ because $\alpha\beta(y)=0$ as $y\in\ker(\alpha\beta)$) and is an epimorphism (if $x\in\ker(\alpha)$ then there exists $y\in R^k$ such that $\beta(y)=x$; then $\alpha\beta(y)=0$ and thus $y\in\ker(\alpha\beta)$). Lastly, an epimorphic image of a finitely generated module is finitely generated.