Prove that $G = \langle x,y\ |\ x^2=y^2 \rangle $ is torsion-free. 
Prove that $G = \langle x,y\ |\ x^2=y^2 \rangle $ is torsion-free.

Here $x^2$ is central as $x^2y=yx^2$ similarly $y^2$ is central. Apart from this  I do not know how to proceed. Taking any arbitrary word in $G$ does not help. 

Your group is an amalgamated free product of infinite cyclic groups along an infinite cyclic subgroup. It is a standard result in combinatorial group theory that a torsion element of an amalgam of groups is conjugate into one of the factors. However, your factors are torsion-free and thus your group is torsion-free.
