this follows from the relation given yesterday. it suffices to establish that $g(S)$ is an equivalence class. the congruence $\sim$ was the transitive closure of $x\sim'y$ iff $x=a_1z_1\dotsc a_nz_n$ and $y=a_1'z_1\dotsc a_n'z_n$ for some $z_1,\dotsc,z_n\in S$ and $a_1,\dotsc,a_n,a_1',\dotsc,a_n'$ in $g(S)$. if $x\sim e$, we have a chain $x=x_1\sim'\dotsc\sim'x_n=e$.
let's do the first one. if $x_n=e=a_1z_1\dotsc a_nz_n$, then $z_n$ has a left-inverse, hence is invertible by assumption, but $a_n$ is also invertible, so we obtain that $a_1z_1\dotsc a_{n-1}z_{n-1}$ is invertible. by induction…