The problem I am facing here is , if I pick any onto endomorphism $\alpha$ on $R$, while having $ab=1 \implies ba=1, $ then it may not be of the form $x\to xb$, which is used to prove its converse part in Lam's exercise book. Any ideas or hints on what I am missing is appreciated.
P.S. R is any ring with unity element.
Every endomorphism of $_RR $ is of the form $x\mapsto xb $ for some $b\in R$.
If $\varphi $ is an endomorphism then take $b=\varphi (1) $. For any $x\in R $, $$\varphi (x)=\varphi (x.1)=x\varphi (1)=xb. $$