Let $(G, *)$ be a groupoid in which the following properties hold:
1) $a * (b * c) = (b * a) * c$ for all $a,b,c \in G$;
2) There exists $u \in G$ such that $u * a = a$;
3) For all $a \in G$ there exists $a'$ such that $a' * a = u$.
I'm more interested in the associative/commutative part of this problem.
First, from (3), we have $a'$ such that $a'*a = u$. Thus by (1) and (2), we have $$ a*u = a*(a'*a) = (a'*a)*a = u*a = a. $$ Thus it follows from (1) that $$ a*b = a*(b*u) = (b*a)*u = b*a.$$ Thus $G$ is commutative. Then the associative follows immediately.