No, the different $x$ in each expression represents slightly different things.
Instead, you can change variables to get:
$$\lambda x.((\lambda x.x)x)=\lambda y.((\lambda z.z)y)$$
$$(\lambda x.(\lambda x.x))x = (\lambda y.(\lambda z.z))x$$
Note that you can "eliminate" the $x$ from the first expression, because all occurrences of $x$ are inside a $\lambda x.\dots$ expression. You cannot do the same for the second.
It is best to think of $\lambda x.\dots$ as providing a "mechanism" for defining a new function. The variable of the function is called $x$, but it can be called anything, as long as we replace all of the "correct" instances of $x$ inside with the new variable name.
Consider the difference between the expressions:
In the first, you can't just write, $x+2=y+2$, but you can say that if $g(y)=y+2$ and $f(x)=x+2$ then $g=f$.
That said, the two expressions above "evaluate" to the same thing. Both functions are the identity function - that is, both functions are equal to $\lambda w.w$.