A ring problem in Bhattacharya's book "Basic Abstract Algebra" Let $R$ be a ring with unity such that for each $a$ in $R$ there exists $x$ in $R$ such that $a^2x=a$. Prove the following:
a) $R$ has no nonzero nilpotent elements.
From now on, fix $a \in R$, and let $x \in R$ be such that $a^2x = a$. (As we know, such $x$ exists.)
b) $axa-a$ is nilpotent so $axa=a$.
c) $ax=xa$.
d) $ax,xa$ are idempotents in the center of $R$.
e) there exists $y$ in $R$ such that $a^2y=a$, $y^2a=y$, and $ay=ya$.
f) $aua=a$, where $u=1+y-ay$ is invertible, and $y$ is chosen as in e).
This is a problem from Bhattacharya's book Basic Abstract Algebra. 
Until I reached d) everything was ok, but when I tried to show $ax$ and $xa$ is in the center of $R$, i absolutely got stuck... I thought about it several days but no idea came in. I will appreciate any help for solving d, e, f.
 A: a). Suppose $a\ne 0$ and is nilpotent, i.e. there is a $n>1$ such that $a^n=0,\:a^{n-1}\ne 0$. There exists $x\in R$ such that $a^2x=a$. But $0=a^nx=a^{n-2}a^2x=a^{n-1}\ne0$, which is contradiction. So $R$ has no nonzero nilpotent elements.
b). If $axa−a\ne0$, then
$$
(axa−a)^2=\underbrace{axaaxa}_{aax=a}-a^2xa-axa^2+a^2=axa^2-a^2-axa^2+a^2=0
$$
i.e. $axa−a$ is nilpotent and by a) is impossible. So $axa=a$.
d). By b), $axax=axa\cdot x=ax$. So $ax$ is idempotent. We prove that $ax$ is in the center of $R$. 
For any $z\in R$, there is
\begin{align}
(axz-axzax)^2&=axzaxz-axzaxzax-\underbrace{axzaxaxz}_{axax=ax} +axzaxaxzax
\\
&=axzaxz-axzaxzax-axzaxz+axzaxzax
\\
&=0
\end{align}
So by a), $axz=axzax$. Again for any $z\in R$
\begin{align}
(zax-axzax)^2&=zaxzax-\underbrace{zaxaxzax}_{axax=ax}-axzaxzax+axzaxaxzax
\\
&=zaxzax-zaxzax-axzaxzax+axzaxzax
\\
&=0
\end{align}
So by a), $zax=axzax=axz$, i.e. $ax$ is in the center of $R$. 
Moreover $xaxa=x\cdot axa=xa$. So $xa$ is idempotent. Similarly we can prove that $xa$ is in the center of $R$. 
c). Since
$$
(ax-xa)^2=axax-\underbrace{axxa}_{x\cdot xa=xa\cdot x}-\underbrace{xaax}_{aax=a}+xaxa=axax-axax-xa+xa=0
$$
So by a), $ax=xa$.
e). This is suggested by Mirko's comment.
Let $y=xax$. Then 
$$
a^2y=a^2 xax=aax=a
$$
Moreover 
$$
ay=axax=\underbrace{xaax}_{a\cdot xa=xa\cdot a}=\underbrace{xaxa}_{a\cdot ax=ax\cdot a}=ya
$$
And
$$
y^2a=\underbrace{xaxxaxa}_{axa=a}=\underbrace{xaxxa}_{x\cdot xa=xa\cdot x}=xaxax=xax=y
$$
f). Let $u=1+y-ay$. Then
$$
aua=a(1+y-ay)a=a^2+\underbrace{aya}_{ay=ya}-\underbrace{a^2ya}_{a^2y=a}=a^2+a^2y-a^2=a
$$
A: Let us finish the proof. It has to be shown that $u$ is invertible. By e) we have $ua=ya=ay=au$ and $uay=y=ayu$. Now let $v=(1+a-ay)$, then
$$uv=u+ua-uay=u+ya-y=1 \quad\text{ and }\quad vu=u+au-ayu=u+ya-y=1.$$
So $u^{-1}=v\in R$ and $u$ is invertible.
