The following question is taken from Arrows, Structures and Functors the categorical imperative by Arbib and Manes.
$\color{Green}{Background:}$
$\textbf{(1)}$ $\textbf{Definition 1:}$ A $\textbf{monoid}$ is a set $X$ equipped with a function $\cdot:X\times X\to X$ (with monoid $\textbf{multiplication}$) and a distinguished element (the monoid $\textbf{identity}$) subject to the two laws:
$x\cdot (y\cdot z)=(x \cdot y)\cdot z$ for all $x,y,z$
$x\cdot e=x=e\cdot x$ for all $x.$
We abbreviate $x\cdot y$ to $xy.$
$\textbf{(2)}$ $\textbf{Definition 2:}$ If $X,Y$ are monoids, a function $f:X\to Y$ is a monoid $\textbf{homomorphism}$ if $f$ preserves the monoid structure of multiplication and identities, i.e., if $f(x\cdot x')=f(x)\cdot f(x')$ and $f(e)=e.$
The $\textbf{identity function}$ $\text{id}_X:X\to X$ is surely a monoid homomorphism and the usual $\textbf{composite}$ $g\cdot f: X\to X$ of two functions is a monoid homomorphism if $f:X\to Y$ and $g:Y\to Z.$
$\textbf{(3)}$ $\textbf{Proposition 3:}$ Given a family $(A_i\mid i\in I)$ of vector spaces, we define their $\textbf{weak direct sum}$ to be
$$\coprod_{i\in I}A_i=\{f\mid f:I\to \cup_{i \in I}A_i;f(i)\in A_i \text{ for each }i;\text{ and supp}(f)\text{ is finite}\}$$
considered as a subspace of $\prod_{i\in I}A_i.$ Then $\coprod_{i\in I}A_i$ together with the injection maps
$\text{in}_j:A_j\to \coprod_{i\in I}A_i:a_j\mapsto$ the $f$ with $f(i)=0$ for $i\neq j,$ and with $f(j)=a_j$
is a coproduct of $(A_i)$ in the category $\textbf{Vect}.$
$\textbf{(4)}$ $\textbf{Assumed exercise:}$
A monoid $X$ is $\textbf{abelian}$ if $xy=yx$ for all $x,y.$ Let $\textbf{Abm}$ be the category of abelian monoids and monoid homomorphisms. Prove that products, equalizers and coequalizers can be constructed by mimicking these constructs in $\textbf{Mon}$ or $\textbf{Grp}.$ Construct coproducts in $\textbf{Abm}$ by imitating the construction in $\textbf{Vect}$
$\color{Red}{Questions:}$
Constructing the coproduct of $\textbf{Abm},$ by modifying notations as necessary in $\textbf{Proposition 3:}$ above in $\textbf{(3)},$ in a concrete example:
Let $I=\{1,2\},$ Let $A_1=X_1$ and $A_2=X_2,$ and $x_1\in X_1$ and $x_2\in X_2,$ a monoid homomorphic map $f(x_1\cdot x_2)=f(x_1)\cdot f(x_2),$ with the assumption that $x_1\cdot x_2=x_2\cdot x_1.$ So $f\in \coprod_{i\in I}X_i.$ means for $I=\{1,2\},$ $f\in X_1\sqcup X_2,$ we have $f:\{1,2\}\to X_1\sqcup X_2:f\mapsto f(i),$ and $f(x_1\cdot x_2):\{1,2\}\to X_1\sqcup X_2:f(x_1\cdot x_2)\mapsto f(x_1)\cdot f(x_2).$
For the injection maps which are also monoid homomorphism, $\text{in}_j:X_j\mapsto X_1\sqcup X_2:x_j\mapsto f(x_i)=0$ for $i\neq j$ and $f(x_j)=x_j$ for $i=j,$ with $f$ being a monoid homomorphic map. $\text{in}_j(x_1\cdot x_2)=f(x_1\cdot x_2)=f(x_1)\cdot f(x_2)=\text{in}_j(x_1)\cdot \text{in}_j(x_2)$ and hence $\text{in}_1(x_1\cdot x_2)=f(x_1\cdot x_2)=x_1,$ $\text{in}_2(x_1\cdot x_2)=f(x_1\cdot x_2)=x_2$
For the $q$ homomorphic map being defined as: $q:\coprod_{i\in I}X_i\to C:f\mapsto \cdot_{i\in I}q_i(\text{in}_j(x_j))=\cdot_{i\in I}q_i(f(x_i))=q_i(0)$ for $i\neq j$ and $\cdot_{i\in I}q_i(\text{in}_j(x_j))=\cdot_{i\in I}q_i(f(x_i))=q_i(x_i)$ for $i=j,$
and so,
$q:\coprod_{i\in I}X_i\to C:f\mapsto \cdot_{i\in I=\{1,2\}}q_i(\text{in}_j(x_1\cdot x_2))= \cdot_{i\in I}q_i(f(x_1\cdot x_2))=q_i(f(x_1)\cdot f(x_2))=q_i(f(x_1))\cdot q_i(f(x_2)),$
With $I=\{1,2\},$ $i=1,2,$ $j=1,2,$ $x_1\in X_1$ and $x_2\in X_2,$ gives
$q:X_1\sqcup X_2\to C:f\mapsto q_1(\text{in}_1(x_1\cdot x_2)=q_1(f(x_1)\cdot f(x_2))=q_1(f(x_1))\cdot q_1(f(x_2))=q_1(x_1)\cdot q_1(0),$
$q:X_1\sqcup X_2\to C:f\mapsto q_1(\text{in}_2(x_1\cdot x_2)=q_1(f(x_1)\cdot f(x_2))=q_1(f(x_1))\cdot q_1(f(x_2))=q_1(0)\cdot q_1(x_2),$
$q:X_1\sqcup X_2\to C:f\mapsto q_2(\text{in}_1(x_1\cdot x_2)=q_2(f(x_1)\cdot f(x_2))=q_2(f(x_1))\cdot q_2(f(x_2))=q_2(x_1)\cdot q_2(0),$
$q:X_1\sqcup X_2\to C:f\mapsto q_2(\text{in}_2(x_1\cdot x_2)=q_2(f(x_1)\cdot f(x_2))=q_2(f(x_1))\cdot q_2(f(x_2))=q_2(0)\cdot q_2(x_2),$
I am not sure why I am getting $q_1(0), q_2(0)$ terms and what they are suppose to be equal to in the above four cases.
Thank you in advance.