free product of the same group Let $G$ and $H$ be two groups. a reduced word is an element of the form $w=g_1h_1g_2h_2...$ after removing an instance of the identity element (of either $G$ or $H$) and 
    replacing a pair of the form $g_1g_2$ by its product in $G$, or a pair $h_1h_2$ by its product in $H$. Denote $G*H$ the set of reduced words $w$ on which we define a group law by concatenation of words and we call it the free product of $G$ and $H$.   
when $G=H$ a word in $G*G$ is an element $w=g_1^1g_2^2g_3^1g_4^2...$ where $g_i^j$ is the element $g_i$ from the  $j$th copy, $j=1,2$. Why we are not allowed to replace $g_1^1g_1^2g_2^1g_2^2...$ by the element $g$ who is the product
$g_1^1g_2^2g_3^1g_4^2...$ since product $g_k^1g_l^2$ is well defined being in the same group  $G$ ?
 A: The short answer is that you're not allowed to do it because that's not the definition of the free product!  
But let me try to explain: the free product of $G$ and $H$ is an "external" product of $G$ and $H$.  It just doesn't depend on whether $G$ and $H$ are subgroups of some common group.  You might as well ask why in the Cartesian product $\mathbb{Z} \times \mathbb{Z}$ you can't identify the element $1$ in the first factor with the element $1$ in the second factor.  That's not how the Cartesian product works: the element $(1,0)$ is distinct from the element $(0,1)$.  
What you're proposing would lead to a similarly incorrect description of the free product.  For instance, according to your proposal $\mathbb{Z} * \mathbb{Z}$ would be an abelian group (indeed it would just be $\mathbb{Z}$), and not what it actually is: the free group on two generators.
A: The free product is actually a coproduct in the category of groups, so it must satisfy a universal property.  Indeed, $G \ast H$ is defined so that if there is any group $X$ along with homomorphisms $G \to X$ and $H \to X$, then there exist a unique homomorphism $\theta : G \ast H \to X$.  If we were allowed to reduce all words in $G \ast G$, then the universal property would be broken (as an exercise, 
try to find a counter-example).
A: I would like to write this as a comment but I am not permitted to do that.
You can formalize this on various ways. One is that, for a given $n \in \mathbb{N}$, a reduced word of lenght $n$ is a concatenation of either of the forms
$g_1 h_1 g_2 h_2 ... g_n h_n$
$g_1 h_1 g_2 h_2 ... h_{n-1} g_n$
$h_1 g_1 h_2 g_2 ... h_n g_n$
$h_1 g_1 h_2 g_2 ... g_{n-1} h_n$
, where $g_k = (a_k,0) \in G \times \mathbb{N}$ and $h_k = (b_k,1) \in H \times \mathbb{N}$, for all $k \in \{ 1 , 2 , ... , n \}$, after removing instances of $(e,0)$ and $(u,1)$, where $e$ is the identity element of $G$ and $u$ is the identity element of $H$, and replacing pairs of the forms $(a_j,0)(a_{j+1},0)$ by $(a_j a_{j+1},0)$, and pairs of the forms $(b_j,1)(b_{j+1},1)$ by $(b_j b_{j+1},1)$, where $a_j a_{j+1}$ is the product in $G$ and $b_j b_{j+1}$ is the product in $H$, for all $j \in \{ 1,2,...,n-1 \}$.
All this work is just to make the groups $ G $ and $ H $ disjoint. If we have $ G \cap H = \varnothing$, then this work don't need to be done. But in this case we have $ G \neq H$.
