I want to prove that the following presentation of a free group (generators and relations):
$$\left(\begin{array}{c|c} x_0,a_0&a_0a_1x_2=x_0a_1\\ x_1,a_1&a_1a_2x_0=x_1a_0\\ x_2,a_2&a_2a_0x_1=x_2a_2 \end{array}\right)$$
is equivalent to the free product
$$(a_0,a_1)\star(x_2,A:A^2x_2=x_2A), \quad A=a_2a_0a_1.$$
I have written the presentation that way in case it is suggestive of the solution. This is an example (#11) from A Quick Trip Through Knot Theory by R. Fox, which is a chapter in Topology of 3-Manifolds, Ed. M.K. Fort.
Mostly I am just overwhelmed by the idea of trying to show that any combinbation of the six generators can always be written as alternating products of the generators of the two free groups in the product. I can show some things (for instance, I can easily show the relation $A^2x_2=x_2A$ holds), but how does one really prove things like this?
This is not a homework but since I am asking it rather like a homework, I will take hints first if that's what some people would like to offer.
Having the answer makes this calculation less nasty than it might otherwise be. Since the desired presentation doesn't involve $x_0$ or $x_1$, it's reasonable to use the first and third of the given relations to eliminate these, expressing them in terms of $x_2$ and the three $a$'s. So your group is generated by $\{a_0,a_1,a_2,x_2\}$ subject to just the one remaining relation, the second on the original list, which becomes, after you plug in the expressions for $x_0$ and $x_1$, $$ a_1a_2a_0a_1x_2a_1^{-1}=a_0^{-1}a_2^{-1}x_2a_2a_0. $$ Transpose all the factors of the form $a_i^{-1}$ to the other sides, and you get $A^2x_2=x_2A$. Finally, since $a_2$ can be expressed in terms of the other two $a$'s and $A$, namely as $a_2=Aa_1^{-1}a_0^{-1}$, we can introduce $A$ as a new generator and eliminate $a_2$. The result is that the group is generated by $\{a_0,a_1,A,x_2\}$ subject to $A^2x_2=x_2A$, as desired.