Show that the kernel of $\omega: G_1*G_2 \to G_1 \times G_2$ given by $\omega(g_1g_2)= \iota_1(g_1) \cdot \iota_2(g_2) = (g_1,g_2)$ is free on $S=\{ gg'g^{-1}g'^{-1}, 1\neq g \in q_1(G_1), 1 \neq g'\in q_2(G_2)\}$.
$G_1 * G_2$ denoting the free product of groups and $G_1 \times G_2$ denoting the direct product of groups.
I've proved in a previous exercise before that $\ker\omega$ is the subgroup of $G_1*G_2$ generated by $S'= \{ gg'g^{-1}g'^{-1}, g \in q_1(G_1), g'\in q_2(G_2)\}$.
To try to prove this, I tried proving the universal property of free groups held here. To do so, I defined $j: S \to\ker\omega$ given by $j(gg'g^{-1}g'^{-1})=gg'g^{-1}g'^{-1}$.
Then given whatever group $G$ and a function $f: S\to G$, I define $\phi:\ker\omega \to G$ such that $$\phi(j(gg'g^{-1}g'^{-1}))=f(gg'g^{-1}g'^{-1})$$ and then I tried to prove it is a homomorphism and that it is unique. But I stumbled upon some doubts and problems. Firstly, I am not sure if defining $\phi$ like that proves its existence and then I had trouble proving it was a homomorphism. I think I am taking the wrong path and I'm quite lost, any help or advice is appreciated, thanks.
$\ker \omega$
for $\ker \omega$. $\endgroup$