The condition that a semigroup $G$ is a group. Let $G$ be a semigroup. Then G is a group if for all $a,b\in G$, the equations $ax=b$ and $ya=b$ have solutions in $G$.
This is the proposition 1.4 of hungerford algebra textbook. Can you give me a hint?
 A: To find a neutral element, consider $a=b$. Name your neutral element $e$. For left/right inverses, consider $ax=e$ and $yb = e$. 
Added : Suppose you want to show uniqueness of the neutral element. First of all, show that a solution to $xa = a$ is also a solution to $ay = a$. Let $x$ and $y$ be two such solutions. 
The equation $za = x$ has a solution, so
$$
xy = (za)y = z(ay) = za = x. 
$$
Similarly, the equation $aw = y$ has a solution, so 
$$
xy = x(aw) = (xa)w = aw = y. 
$$
It follows that $x=y$. In particular, if $y$ is a solution to $ay = a$, then all the solutions to $xa = a$ are equal to $y$, so there is a unique solution to $xa = a$. Similarly there is a unique solution to $ay = a$, so there is a unique neutral element for $a$. Call this element $e_a$. 
Should I give more hints? The idea is to keep playing so that you accumulate enough properties to get your group. I don't have the whole proof in my head, but as soon as you'll have enough properties to have a group, you can clean the mess and make a clean proof out of it. 
I add the rest of the proof here. Hover your mouse over if it you want to see. 

 Let $a,b \in G$ and consider their unique neutral elements $e_a$, $e_b$ as above. Note that since $a e_a^2 = (ae_a)e_a = a e_a = a$, we have $e_a^2 = e_a$. Now we show that $e_a e_b = e_a$. Pick $z \in G$ such that $z e_b = e_a$. Then $e_a e_b = z e_b e_b = z e_b^2 = z e_b = e_a$. Similarly, pick $y \in G$ such that $e_a y = e_b$, so that $e_a e_b = e_a^2 y = e_a y = e_b$. Therefore $e_a = e_a e_b = e_b$. This implies $e_a = e_b$ for all $a,b \in G$, i.e. there exists a unique neutral element which we call $e$. Now all we need to show is that left and right inverses (i.e. solutions to $ax=e$ and $ya = e$) are equal. But if $ax = e$ and $ya = e$, then $y = ye = y(ax) = (ya)x = ex = x$, so we have a group. 

Hope that helps,
