I at a loss here. Showing that $G$ has an identity is the difficult part here. Obviously for each $a\in G$ there are $b,c\in G$ such that $ab=a$ and $ca=a$, but I need a hint as to how to prove these are all the same element.
In the finite case, the pigeonhole principle certainly shows that they all can't be different.
You can use the given property to check directly that $ab = a$ for some $a,b$ forces $b$ to be a right identity. For any $d$, write $d = ea$ and then $db = eab = ea = d$. From here it is straightforward to show that $ca = a$ similarly implies that $c$ is a left identity, and then $c = cb = b$ shows that there exists a two-sided identity.