Given a set function $f : A \rightarrow B$, my book notes that the kernel relation $R_f = \{ (a_1, a_2) | f(a_1) = f(a_2) \}$ along with the corresponding projections is a pullback: $$\require{AMScd} \begin{CD} R_f @>>> A\\ @VVV @VV{f}V \\ A @>>{f}> B \end{CD}$$
But what about its dual? Let's consider $$\begin{CD} A @>{f}>> B\\ @V{f}VV @VVV\\ B @>>> Z \end{CD}$$
Here, by construction of pushouts in $\mathbf{Set}$, $Z$ is $B \amalg B / \sim$, where $\sim$ is the finest relation such that $\forall a \in A : f(a) \sim f(a)$. But the trivial relation ($\forall b \in B : b \sim b$) will do, so is $Z$ just $B \amalg B$? Did I miss anything?
That is not correct. Let's set things up with some clearer notation. If we let $i : B \rightarrow B \amalg B$, be the embedding into the first copy of $B$, and similarly let $j$ be the embedding into the second copy, then the relation $\sim$ is the finest satisfying $\forall a \in A : i(f(a)) = j(f(a))$. The closest analogue of the "trivial relation" is $\forall b \in B: i(b) \sim j(b)$. Even this is not correct, because there is a finer relation: we only have $i(b) \sim j(b)$ for $b \in f(A)$.
Thus the pushout is $B \amalg B$ with the two copies of $f(A) \subseteq B$ identified. Two extreme cases are: $A = \emptyset$, in which case the pushout is just $B \amalg B$; and $f$ is surjective, in which case the pushout is $B$.