I have to prove that there's a unique $\gamma : M'' \rightarrow N''$ that completes this diagram considering the rows are exact.
$$\begin{array} MM' \stackrel{f_1}{\longrightarrow} & M & \stackrel{f_2}{\longrightarrow} & M'' {\longrightarrow} &0\\ \downarrow{\alpha} & \downarrow{\beta} \\ N' \stackrel{g_1}{\longrightarrow} & N & \stackrel{g_2}{\longrightarrow} & N'' \end{array} $$
Since $f_2$ is surjective for all $x \in M''$ there's at least one $ y\in M$ so that $f_2 (y) = x$. Call $y = f^{-1}_2 (x)$. Now consider $\gamma(x) = g_2(\beta(f^{-1}_2 (x)))$. Then $$\gamma (f_2(x)) = g_2(\beta(f^{-1}_2 (f_2(x)))) = g_2(\beta(x))$$
So that would be it, but I'm not 100% sure this $\gamma$ is well defined because $f_2$ is not injective and I can only guarantee that $x \in f^{-1}_2(f(x)) $. I imagine I can fix a certain $x \in M''$ and construct $\gamma$ so that is works that particular $x$, and since I can do this for all of them, then it's well defined, but I'm not convinced that this is right or the best way to do it.
Any help would be greatly appreciated.
One should approch this more conceptually:
The uniqueness is an immediate consequence of the surjectivity of $f_2$ (You can view this as a definition of the term surjective).
The existence follows from the universal property of the cokernel, which is the same as the fundamental homomorphism theorem:
The morphism $g_2 \circ \beta$ annihilates anything, which comes from $f_1$, hence it factors over the cokernel of $f_1$, which is $M''$.