This is an abstract algebra exercise. See also here.
Let $(X,*)$ be an algebraic structure with $*$ a binary operation. If $$ (x*y)*y=x=y*(y*x),\qquad \forall x,y\in X$$ show that $*$ is commutative.
Proof Set $a:=x*y$, $b:=y*x$, then $$ x*a=x*(x*y)=y\implies x=(x*a)*a=y*a\implies b=y*x=y*(y*a)=a$$
There is also an example $(\mathbb{Z},*)$ with $m*n:=-(m+n)$.
I want to know if there is any background behind this exercise. Is there a name for this kind of axiom, or a name for $X$? (I only know the given axiom implies $(X,*)$ is a commutative quasi-group.)
Thanks in advance!