$a,b,x$ are elements of a group .
$x$ is the inverse of $a$.
Here is my attempt to prove it :-
$a\cdot b = 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$
This is pretty standard, basic and elementary stuff; the kind of stuff one usually sees in the first few pages of a textbook on group theory; but essential stuff nevertheless.
Our OP neraj's proof that $x = b$ is, of course, unarguably flawless. Lauds.
If we wish to see that
$ab = e \Longrightarrow ba = e \tag 1$
under the given hypotheses of the question, the simplest thing we can do is exploit the given that $x$ is the inverse of $a$, which by definition means that
$ax = xa = e; \tag 2$
of course we often write
$x = a^{-1} \tag 3$
under such circumstances; in any event, if
$ab = e, \tag 4$
then
$(ab)a = ea = a; \tag 5$
thus
$a(ba) = a, \tag 6$
whence, by (2),
$ba = e(ba) = (xa)(ba) = x((ab)a) = x(ea) = xa = e. \tag 7$