Relation between the kernel of two ring homomorphisms 
If I have two surjective ring homomorphisms $f_1:R\to R_1$ and $f_2:R\to R_2$ such that $\ker(f_1)$ is contained in $\ker(f_2)$, then there is only one ring homomorphism $g$ such than $g*f_1 = f_2$.

I am really lost. This is what I tried:
I take an element $x \in R$ if $x \in \ker(f_1)$ then for any ring homomorphism $g$ $g(f_1(x))) = 0$ if $x \in \ker(f_2) / \ker(f_1)$  then I send $y= f_1(x)$, $g(y) = 0$, if $x$ is not in $\ker(f_2)$ then I send $y= f_1(x)$, $g(y) = f_2(x)$, then I prove using cases I get to prove that $g$ is an ring homomorphism, the unicity comes from $f_2$ being surjective, then $\forall x \in R_2$ there is $y \in R, f_2(y) = x$, then it follows that $g_1(f_1(y)) = g_2(f_1(y))$.
What am I missing?
 A: Note that since $f_1$ and $f_2$ are surjective, then $R_1 \cong R/\ker(f_1)$ and $R_2 \cong R/\ker(f_2)$ by the First Isomorphism Theorem.  Thus we first show the existence of a unique map $h: R/\ker(f_1) \to R/\ker(f_2)$.  (This result is sometimes called the Zero$^\text{th}$ Isomorphism Theorem.)
There's only one reasonable thing to do: we need a map $h$ such that the following diagram commutes
$\hspace{4.5cm}$
where $\pi_1, \pi_2$ are the quotient maps that send $r \mapsto r + \ker(f_i)$ for $i= 1,2$.  Thus we define $h$ by mapping $r+ \ker(f_1) \mapsto r + \ker(f_2)$.  It remains to show that this map is well-defined.  If $r + \ker(f_1) = s + \ker(f_1)$, then $r-s \in \ker(f_1) \subseteq \ker(f_2)$, so
$$
h(r) = r + \ker(f_2) = s + \ker(f_2) = h(s) \, ,
$$
as desired.  Thus we have shown the existence of a map such that the diagram commutes.  Moreover, since the definition of $h$ was forced by the commutativity of the diagram, this shows that the map is unique.
To return to the problem as stated, we now compose with the isomorphisms $\varphi_1: R_1 \overset{\sim}{\to} R/\ker(f_1)$ and $\varphi_2: R_2 \overset{\sim}{\to} R/\ker(f_2)$.  So define $g = {\varphi_2}^{-1} \circ h \circ \varphi_1$:
$$
g: R_1 \overset{\varphi_1}{\to} R/\ker(f_1) \overset{h}{\to} R/\ker(f_2) \overset{{\varphi_2}^{-1}}{\to} R_2 \, .
$$
