In Steve Awodey's book Category Theory, he has some proof that seems wrong to me on page $60$, he mentioned a proposition that
Proposition $3.11.$In the category $Ab$ of abelian groups, there is a canonical isomorphism between the binary coproduct and product,
$$A+B \cong A \times B.$$
And his proof goes as follows,
Proof. To define an arrow $\theta:A+B \to A \times B,$ we need one $A \to A \times B$ (and one $B \to A \times B$), so we need arrows $A \to A$ and $A \to B$ (and $B \to A$ and $B \to B$). For these, we take $1_A : A \to A$ and the zero homomorphism $0_B : A \to B$ (and $0_A:B \to A$ and $1_B : B \to B$). Thus, all together, we get $$\theta = [\langle1_A,0_B\rangle,\langle0_A,1_B\rangle]:A+B \to A \times B.$$ Then given any $(a,b) \in A+B,$ we have $$\theta(a,b) = [\langle1_A,0_B\rangle,\langle0_A,1_B\rangle](a,b) \\ =\langle1_A,0_B\rangle(a)+\langle0_A,1_B\rangle (b) \\ = \langle1_A(a),0_B(a)\rangle+\langle0_A(b),1_B(b)\rangle \\ = (a,0_B) + (0_A,b) \\= (a+0_A,0_B+b)\\ = (a,b) $$
My question is that: where did he exactly use the assumption that the group $A$ and $B$ are abelian. He did not explicitly stated the fact, so I am a little bit suspicious about the proof.
And another thing, he leave the identity $[f,g](a,b) = f(a)+_X g(b)$ (page $60$) as an exercise. I did not get the way to prove it. If anyone has the proof, please share in the post. Thank you.