If in a semigroup $S$, $\forall x \exists ! y:xyx=x$, then $S$ is a group If for all $x$ in a semigroup $S$, there exists a unique $y$ such that $x y x=x$, then $S$ is a group. (Not to be confused with inverse semigroup, where only $y$ satisfying both $xyx=x$ and $yxy=y$ is unique)

After tring with no result, I used Prover9 to find a proof. I did get one but it was very hard to understand (possible to go through once but really hard to remember what the point is).

Is there any somewhat comprehensible or conceptual proof to this? Is there a theory underlying this?
Hint: You just need to find unique inverses for every element, and the identity element will arise by making $xx^{-1}$ with any element.

If for all $x$, there is a unique $y$ such that $xyx=x$, then for all $x$ there is a unique $y$ such that $yx$ does nothing to the element... Can you find the identity element and the ivnerses from here?
Hint: You just need to find unique inverses for every element, and the identity element will arise by making $xx^{-1}$ with any element.

If for all $x$, there is a unique $y$ such that $xyx=x$, then for all $x$ there is a unique $y$ such that $yx$ does nothing to the element... Can you find the identity element and the ivnerses from here?