[step:Show that every coequalizing homomorphism is constant on $\sim$-classes]
Let $C$ be an object of $\mathcal C$, and let
\begin{align*}
h: B \to C
\end{align*}
be a homomorphism satisfying
\begin{align*}
h \circ f = h \circ g.
\end{align*}
Define the kernel relation of $h$ by
\begin{align*}
\ker(h) := \{(b_1,b_2) \in B \times B : h(b_1) = h(b_2)\}.
\end{align*}
This relation is a congruence on $B$: it is an [equivalence relation](/page/Equivalence%20Relation) because equality in $C$ is an equivalence relation, and it is compatible with all basic operations because $h$ is a homomorphism. Indeed, if $\omega$ is an $n$-ary operation symbol and $(b_i,c_i) \in \ker(h)$ for $1 \le i \le n$, then
\begin{align*}
h(\omega_B(b_1,\dots,b_n))
&= \omega_C(h(b_1),\dots,h(b_n)) \\
&= \omega_C(h(c_1),\dots,h(c_n)) \\
&= h(\omega_B(c_1,\dots,c_n)),
\end{align*}
so
\begin{align*}
(\omega_B(b_1,\dots,b_n),\omega_B(c_1,\dots,c_n)) \in \ker(h).
\end{align*}
For each $a \in A$, the equality $h \circ f = h \circ g$ gives
\begin{align*}
h(f(a)) = h(g(a)),
\end{align*}
so $(f(a),g(a)) \in \ker(h)$. Thus $\ker(h)$ is a congruence on $B$ containing every generating pair $(f(a),g(a))$. Since $\sim$ is the smallest such congruence, we have
\begin{align*}
\sim \ \subseteq \ker(h).
\end{align*}
Consequently, whenever $b_1,b_2 \in B$ satisfy $b_1 \sim b_2$, we have $h(b_1)=h(b_2)$.
[/step]