[proofplan]
We prove the kernel assertion directly from the universal property of a kernel: two maps into the kernel become equal after composing with the kernel map, and the uniqueness clause forces the two maps to coincide. The cokernel assertion is the dual argument: two maps out of the cokernel that agree after precomposition with the cokernel map are both factorizations of the same map through the cokernel, so uniqueness forces equality. The zero object is used only to make the zero morphisms appearing in the definitions of kernel and cokernel available.
[/proofplan]
[step:Use the kernel universal property to prove left cancellation]
Let $f: A \to B$ be a morphism in $\mathcal{C}$, and let $k: K \to A$ be a kernel of $f$. To prove that $k$ is a monomorphism, let $X \in \operatorname{Ob}(\mathcal{C})$ be an object and let $u,v: X \to K$ be morphisms such that
\begin{align*}
k \circ u = k \circ v.
\end{align*}
Define the common composite morphism $g: X \to A$ by
\begin{align*}
g := k \circ u = k \circ v.
\end{align*}
Since $k$ is a kernel of $f$, it satisfies $f \circ k = 0_{K,B}$, where $0_{K,B}: K \to B$ is the zero morphism. Hence
\begin{align*}
f \circ g
&= f \circ k \circ u \\
&= 0_{K,B} \circ u \\
&= 0_{X,B}.
\end{align*}
Thus $g: X \to A$ is a morphism killed by $f$.
By the universal property of the kernel $k: K \to A$, there exists a unique morphism $w: X \to K$ such that
\begin{align*}
k \circ w = g.
\end{align*}
Both $u$ and $v$ satisfy this equation, because $k \circ u = g$ and $k \circ v = g$. By uniqueness, $u=v$. Since this holds for every object $X$ and every pair $u,v: X \to K$, the morphism $k$ is a monomorphism.
[guided]
We want to prove that $k: K \to A$ is a monomorphism. By definition, this means that $k$ is left-cancellable: for every object $X$ and every pair of morphisms $u,v: X \to K$, the equality $k \circ u = k \circ v$ must imply $u=v$.
So fix an object $X \in \operatorname{Ob}(\mathcal{C})$ and morphisms $u,v: X \to K$ satisfying
\begin{align*}
k \circ u = k \circ v.
\end{align*}
Let $g: X \to A$ denote this common composite:
\begin{align*}
g := k \circ u = k \circ v.
\end{align*}
The reason for introducing $g$ is that the kernel universal property applies to morphisms into $A$ that are killed by $f$.
We verify that $g$ is killed by $f$. Since $k$ is a kernel of $f$, the defining equation for a kernel gives
\begin{align*}
f \circ k = 0_{K,B},
\end{align*}
where $0_{K,B}: K \to B$ is the zero morphism determined by the zero object of $\mathcal{C}$. Therefore
\begin{align*}
f \circ g
&= f \circ k \circ u \\
&= 0_{K,B} \circ u \\
&= 0_{X,B}.
\end{align*}
Thus $g: X \to A$ is exactly the kind of morphism to which the universal property of the kernel applies.
The universal property says that there is a unique morphism $w: X \to K$ such that
\begin{align*}
k \circ w = g.
\end{align*}
But $u$ satisfies this equation because $k \circ u = g$, and $v$ satisfies it because $k \circ v = g$. Since the morphism with this property is unique, we must have $u=v$.
This proves left cancellation for $k$, so $k$ is a monomorphism.
[/guided]
[/step]
[step:Use the cokernel universal property to prove right cancellation]
Let $q: B \to Q$ be a cokernel of $f: A \to B$. To prove that $q$ is an epimorphism, let $Y \in \operatorname{Ob}(\mathcal{C})$ be an object and let $u,v: Q \to Y$ be morphisms such that
\begin{align*}
u \circ q = v \circ q.
\end{align*}
Define the common composite morphism $h: B \to Y$ by
\begin{align*}
h := u \circ q = v \circ q.
\end{align*}
Since $q$ is a cokernel of $f$, it satisfies $q \circ f = 0_{A,Q}$. Hence
\begin{align*}
h \circ f
&= u \circ q \circ f \\
&= u \circ 0_{A,Q} \\
&= 0_{A,Y}.
\end{align*}
Thus $h: B \to Y$ is a morphism that kills $f$ after postcomposition.
By the universal property of the cokernel $q: B \to Q$, there exists a unique morphism $r: Q \to Y$ such that
\begin{align*}
r \circ q = h.
\end{align*}
Both $u$ and $v$ satisfy this equation, because $u \circ q = h$ and $v \circ q = h$. By uniqueness, $u=v$. Since this holds for every object $Y$ and every pair $u,v: Q \to Y$, the morphism $q$ is an epimorphism.
[guided]
We now prove the dual statement for cokernels. To show that $q: B \to Q$ is an epimorphism, we must prove right cancellation: for every object $Y$ and every pair of morphisms $u,v: Q \to Y$, the equality $u \circ q = v \circ q$ must imply $u=v$.
Fix an object $Y \in \operatorname{Ob}(\mathcal{C})$ and morphisms $u,v: Q \to Y$ such that
\begin{align*}
u \circ q = v \circ q.
\end{align*}
Let $h: B \to Y$ denote this common composite:
\begin{align*}
h := u \circ q = v \circ q.
\end{align*}
The cokernel universal property applies to morphisms out of $B$ whose composite with $f$ is the zero morphism, so we check that $h \circ f$ is zero.
Because $q$ is a cokernel of $f$, it satisfies
\begin{align*}
q \circ f = 0_{A,Q},
\end{align*}
where $0_{A,Q}: A \to Q$ is the zero morphism. Therefore
\begin{align*}
h \circ f
&= u \circ q \circ f \\
&= u \circ 0_{A,Q} \\
&= 0_{A,Y}.
\end{align*}
Thus $h: B \to Y$ is a morphism annihilating $f$ on the right.
The universal property of the cokernel says that there is a unique morphism $r: Q \to Y$ such that
\begin{align*}
r \circ q = h.
\end{align*}
Both $u$ and $v$ satisfy this equation: $u \circ q = h$ and $v \circ q = h$. By uniqueness, $u=v$.
This proves right cancellation for $q$, so $q$ is an epimorphism.
[/guided]
[/step]