EliminatedWord( word, gen, by )
EliminatedWord returns a new word where each occurrence of the
generator gen is replaced by the word by.
gap> a := AbstractGenerator("a");;
gap> b := AbstractGenerator("b");;
gap> w := (a^2*b)^5*b^-1;
a^2*b*a^2*b*a^2*b*a^2*b*a^2
gap> EliminatedWord( w, b, b^2 );
a^2*b^2*a^2*b^2*a^2*b^2*a^2*b^2*a^2
GAP 3.4.4