Since $f\colon A\to A'/B'$ is onto, and factors through $A/B$, then $A/B\to A'/B'$ is onto.
Since $A_0\to A$ is one-to-one, the kernel of $A_0\to A/B$ is $A_0\cap B=B_0$, so $A_0/B_0$ embeds into $A/B$ by mapping $a+B_0$ to $a+B$.
If $a\in A_0$, then $f(a+B) = f(a)+B'$, and since $f(a)=0$, then the composition is zero.
So the only issue is whether, if $a+B$ maps to zero, then $a+B$ is in the image of $A_0/B_0$. If $a+B$ maps to zero in $A'/B'$, then $f(a)\in B'$, so there exists $b\in B$ such that $f(b)=f(a)$. Thus, $a-b\in A_0$. Since $a+B = (a-b)+B$, and $(a-b)+B$ is the image of $a-b+B_0$, this follows.