This is not an assignment question. I have been self teaching myself abstract algebra from this book and this is one of the exercise questions which I could n't solve.
Suppose $e$ is the identity element for a binary operation $*$ defined on S. If $*$ satisfies the identity $x * (y * z) = (x * z) * y$ where $x,y,z$ are elements of $S$, then show that $*$ is both commutative and associative.
In all my attempts I started with the left hand side of the identity but kept getting stuck at how to can $z$ jump across $y$. The only other known piece of information I was considering was that $e * a = a * e = a$, where $a$ belongs to $S$ and this holds for all elements of $S$.
Any help would be highly appreciated.