Assume that $*$ is an operation on $S$ with identity element $e$ and that $x*(y*z)=(x*z)*y$ for all $x, y, z$ in $S$. prove that $*$ is commutative and associative
Ok, I know that in order for it to be associative then $x*(y*z)=(x*y)*z$ and that $(x*z)*y=x*(z*y)$ and that $x=e$, so then $y*z=z*y$ for every $z,y$ in $S$ but I'm not sure how to actually prove this statement
Hint:
First prove commutativity, setting $x=e$. Then it is very easy to deduce associativity.
A small remark: to prove associativity, you have to prove a single equality, not two.