coproduct of sets (Exercise 2 of Session 25 in "Conceptual Mathematics 2nd Edition") I want to show the following fact.
Suppose that in the category of sets and functions, there are objects $S$, $B_1$, $B_2$ and arrows $j_1\colon B_1 \to S$ and $j_2\colon B_2\to S$. 
If for any arrows $f_1\colon B_1 \to 2$ and $f_2\colon B_2 \to 2$ ($2$ is a two-point set) there exists a unique arrow $u\colon S\to 2$, satisfying equations $f_1=u\circ j_1$ and $f_2=u\circ j_2$, then for any object $X$ and any arrows $g_i\colon B_i \to X$, ($i=1,2$), there exists a unique arrow $u'\colon S\to X$, satisfting equations $g_i=u'\circ j_i$,
($i=1,2$), and $S$ is a coproduct of $B_1$ and $B_2$ in the category of sets and functions.
 A: Note, that there is a set-theoretical construction of a coproduct of $B_1$ and $B_2$ in $\mathbf{Set}$. It is the set:
$$
B_1\sqcup B_2=\{(i,x)\in(2\times(B_1\cup B_2))|\text{if $i=0$, then $x\in B_1$, and if $i=1$, then $x\in B_2$}\}
$$ 
with obvious injections $s_1\colon B_1\to B_1\sqcup B_2$ and $s_2\colon B_2\to B_1\sqcup B_2$. What you need to show is that $B_1\sqcup B_2\cong S$. Hint: try to prove that the mapping $k\colon (i,x)\mapsto j_i(x)$ is a bijection.
Let's prove that the mapping $k\colon B_1\sqcup B_2\to S$ is surjective. Let $\Delta_0\colon B_1\to 2$ and $\Delta_1\colon B_2\to 2$ be constant mappings with values $0$ and $1$ respectively. Then by the initial data there exists a unique mapping $u\colon S\to 2$, such that $u\circ j_1=\Delta_0$ and $u\circ j_2=\Delta_1$. If $k$ is not surjective, then there exists an element $y\in S$, such that $y\notin k(B_1\sqcup B_2)$. Then define the mapping $u'\colon S\to 2$, such that $u'(x)=u(x)$ for every $x\in S\setminus\{y\}$ and $u'(y)=(u(y)+1)\text{mod}2$. Then it is easy to see that $u'\circ j_1=\Delta_0$ and $u'\circ j_2=\Delta_1$, but $u'\ne u$, so we came to a contradiction. 
