Defining a coproduct in $\mathsf{Grp}$ using group presentations I've encountered this exercise in Aluffi's Algebra: Chapter 0. It might be helpful to say that the book doesn't introduce functors at this stage,, and that the book defines a presentation of a group $G$ as a pair
$(A\mid \Psi)$, where $\Psi$ is a subset of $F(A)$ such that $G \cong F(A)/R$, where $R$ is the smallest normal subgroup of $F(A)$ containing $\Psi$.
So, here is the exercise.

Let $(A\mid \Psi)$, resp., $(A'\mid \Psi')$, be a presentation for a group $G$, resp. $G'$; we may assume that $A,A'$ are disjoint. Prove that the group $G\ast G'$ presented by $(A\cup A'\mid \Psi\cup\Psi')$ satisfies the universal property for the coproduct of $G$ and $G'$ in $\mathsf{Grp}$.
(Use the universal properties of both free groups and quotients to construct natural homomorphisms $G\rightarrow G\ast G'$ and $G'\rightarrow G\ast G'$.

First of all, why would we assume that $A,A'$ are disjoint? If they are then their union is their disjoint union as well. But can any 2 groups be presented with $A\cap A' = \emptyset$?
Secondly, I still can't prove it even for disjoint $A$ and $A'$. So, will be thankful for any tips.
 A: Let $G\ast G'=(A \cup A' \mid \Psi \cup \Psi')$.
By the universal property for free groups, for the set map $f: A \to G\ast G'$ where $f(a)=a$, there exists a unique group homomorphism $\bar f: F(A) \to G\ast G'$ defined on the generating set $A$ by $\bar f(a)=f(a)=a$ and making the relevant diagram commute. Similarly, for $g: A' \to G\ast G'$, we have a homomorphism $\bar g: F(A') \to G\ast G'$.
Next, $R \subset \ker \bar f$ and so by the universal property for quotients there exists a unique homomorphism $\tilde f: G=F(A)/R \to G\ast G'$ defined by $\tilde f(aR)=\bar f(a)=f(a)=a$ and making the relevant diagram commute. Similarly, there exists a hom $\tilde g: G' = F(A')/R' \to G \ast G'$.
So, we actually have our natural maps $G \hookrightarrow G\ast G'$ and $G' \hookrightarrow G \ast G'$.
Now, for any group $Z$ and any pair of homomorphisms $\varphi: G \to Z$ and $\psi: G' \to Z$, we know these maps are determined by where they map the generators in $A$ and $A'$, respectively. So, there exists a unique map $\sigma: G\ast G' \to Z$ by mapping $a \in A$ to $\sigma(a)=\varphi(a)$ and $a' \in A'$ to $\sigma(a')=\psi(a')$.
A: A map out of a group with presentation $(A,\Psi)$ is just a choice of image for each element of $A$ that respects the relations $\Psi$. So a map out of $(A\sqcup A', \Psi\sqcup \Psi')$ is just a choice of images for each element of $A\sqcup A'$ respecting the relations in $\Psi$ and in $\Psi'$. But since the relations in $\Psi$ have nothing to do with $A'$ and vice versa, this is just the same as the data of a map out of $(A,\Psi)$ and a map out of $(A',\Psi')$.
A: Here's a simple case when $A$ and $A'$ aren't disjoint: let $A = A' = \{ x \}$, and let $\Psi = \Psi' = \varnothing$. Then $G=G'=F1$, that is, $G$ and $G'$ are both the free group on one generator.
The coproduct of $G$ and $G'$ in $\mathsf{Grp}$ is the free group on two generators, however
$$(A \cup A' \mid \Psi \cup \Psi') = (\{x\} \mid \varnothing) = F_1$$
so that $(A \cup A' \mid \Psi \cup \Psi')$ is not the coproduct of $G$ and $G'$.
As for why $G * G' = (A \cup A' \mid \Psi \cup \Psi')$ when $A \cap A' = \varnothing$, prove that the inclusion maps
$$G \hookrightarrow (A \cup A' \mid \Psi \cup \Psi'), \qquad G' \hookrightarrow (A \cup A' \mid \Psi \cup \Psi')$$
are homomorphisms and that if there is a group $H$ and homomorphisms
$$f : G \to H, \qquad f' : G' \to H$$
then there is a unique homomorphism $\bar f : (A \cup A' \mid \Psi \cup \Psi') \to H$ such that $\bar f \upharpoonright G = f$ and $\bar f \upharpoonright G' = f'$. This is reasonably easy if you write down all the definitions, since $\bar f$ is determined by its action on the generators, i.e. the elements of $A \cup A'$.
A: Here's what I tried to do.
Let's construct a homomorphism $F(A) \xrightarrow{\rho} F(A\cup A')/R''$, where $R''$ is the normal closure of $\Psi \cup \Psi'$. Define $\rho(w) = wR''$.
Then by universal property of quotients(and since the normal closure of $\Psi$ $R \subseteq R''$) we have a unique homomorphism $F(A)/R \xrightarrow{i_1} F(A \cup A')/R''$ defined by $i_1(wR) = wR''$.
Similarly, we have a homomorphism $F(A')/R' \xrightarrow{i_2} F(A \cup A')/R''$.
Then for all groups $G$ and homomorphisms $F(A)/R \xrightarrow{f} G$, $F(A')/R' \xrightarrow{g} G$ we have aunique correspoding morphism $F(A \cup A')/R'' \xrightarrow{\phi} G$ defined $\phi(wR'') = f(wR)$ if $w \in F(A)$ and $\phi(wR'') = g(wR')$ if $w \in F(A')$. If $w$ is a word which consist of letters from both $A$ and $A'$ then(since \phi is a homomorphism) we have $\phi(w) = ...f(a_1R)...g(a'_1R')...$ and so on.
Then $F(A \cup A')/R''$ satisfies a universal property of a coproduct of $F(A)/R$ and $F(A')/R'$.
