If $ab = e$, then $ba = e$? $x\cdot (a\cdot b) = x\cdot e$
$(x\cdot a)\cdot b = x$
$e\cdot b = x$
$b = x$
Are my steps correct?
What I wanted to prove is that if $ab = e$, then $ba = e$
$x$ is inverse of $a$ and $e$ is identity element .

I don't see why you need to introduce $x$ for $a^{-1}$. Since $ab=e$ we have
\begin{align*}
e & = a^{-1}ea\\
 & = a^{-1}(ab)a\\
 & = ba
\end{align*}
by multiplying 
by $a^{-1}$ from the left and then by $a$ from the right. So conjugating $ab=e$ gives $ba=e$.
