NB: this is Hard. It is not a homework problem and it is a question that I would like on the one hand to share with you and on the other to help gain insight into myself.
Let $G$ be a set (which you may assume if you wish to either be finite, or in the infinite case the axiom of choice if you need it) on which we define an associative binary operation between any two elements $x,y \in G$ with $xy \in G$. Suppose that for every $a \in G$ there exists a unique $a^* \in G$ such that $aa^*a=a$. Prove that $G$ is a group.
So we need inverses and an identity. The closest I got to any meaningful progress was placing equivalence relations on elements in $G$ so as to partition it into smaller sets that have nicer structure. In particular, with one equivalence relation I constructed, I almost (but not quite) partitioned $G$ into sets which were groups under the binary operation, which I'm pretty sure would lead to the whole of $G$ being one equivalence class (or a contradiction). As an example, one of my first attempts was $x \sim y$ if and only if $x=ayb,y=cxd$ for $a,b,c,d \in G$. (Later attempts had things like $x=ay=y^*b, y=cx=x^*d$ etc). I don't know if this is fruitful but I'm putting it out there.
A couple of questions I found here that may prove useful:
Let $G$ be a set with associative binary operation and a unit.
For an associative binary operation with identity, the set of invertible elements forms a group
Hope you enjoy!