First of all the way you approach the definition is wrong and obfuscating which leads to your second question. Also, your confusion regarding the polynomials stems from a common problem a lot of people have when they start dealing with (a bit more) abstract mathematics: They mix up the object with the representation of the object.
What your definition says is this: Imagine I give you two objects $a,b\in S$ to compare for equality. These two objects are equal if and only if they are one and the same. Typically, the set theoretic approach to a binary relation on a set $S$, is an $R\subset S\times S$. This means that the equality relation is $E=\{(a,a)\in S\times S : a\in S\}$, which means that $a=b$ if and only if $(a,b)\in E$ which is true exactly when $a$ and $b$ are one and the same (or more concisely -which I purposely avoided- exactly when $a=b$). This may sound pointless and uninteresting and tautological. Actually Wittgenstein in "Tractatus Logico-philosophicus" points out this apparent pointlessness of "$=$". But such a concept is fruitful mathematically because the mathematical interest in the elements of $S$ lies in their properties: We want to know about the form, the structure of a mathematical universe and our only means of describing it is through a mathematical language. Saying $3=3$ is uninteresting but saying that for every $x,y$ we have $(x+y)^2=x^2+y^2+2xy$ tells you something and the fact that given any number $n\geq 3$ you can never find positive natural numbers $a,b,c$ such that $a^n+b^n=c^n$ is not trivial at all.
Now regarding your confusion, as others have pointed out you are mixing the expressions of polynomials with polynomials. $6x-6x$ is a description of a polynomial and so is $0$. But these two descriptions talk about the same polynomial. This is essentially the information conveyed by writing $0=6x-6x$ (see the usefulness of the equality relation here). Using objects that are -in some sense- different to indicate the same thing is something we do all the time, even outside of mathematics. Without this we wouldn't be able to communicate, since words as physical objects are different from one another, even though they may spell the same thing. Every time you see letters on a paper, you ignore their physical nature (their consisting of atoms that you have most probably never encountered before, and definitely not in that form) and only care about what they symbolise.
Finally, regarding you second question: Formally, no, it is the same definition. In a formal environment the standard definition of the meaning of the symbol "$=$" is always the diagonal. An expression such as $x^2=2x$ doesn't have any meaning whatsoever because $x$ is a free variable. We assign a truth value (true or false) in sentences which are defined as formulas that contain no free variable. Intuitively, ask yourself the following: First of all what is this $x$? Secondly, a relation is defined as a subset of the Cartesian product of a set. What is this set? For "$=$" to be a relation in the formula $x^2=2x$ would mean that $x^2$ and $2x$ are elements of a set. So your question isn't well defined. What we mean when we say that some $a\in\mathbb{R}$ (for example) satisfy $x^2=2x$ is that $a^2=2a$, or that the $a^2$ is the same number with $2a$, which is exactly the definition of the equality I (and the book you are studying) presented.
Edit: When you write a mathematical sentence like "$2+3=5$" or "$(\forall x)((2x)^2=4x^2)$" you have to keep in mind that these are strings of symbols. As Calvin points out these strings don't have a specific meaning. Meaning is something we equip on a language. Tarski's definition of truth intuitively is pretty much what we do when we teach very young children the meaning of words. We show them the objects and say "This is a CAR". Through repetition, children learn to equip the concept of an automobile to the sound "car".
Tarski said roughly the same: Assume that we have a set $S$, a function $f:S\times S\to S$, a relation $E\subset S\times S$ and some elements $a,b,c\in S$. Now I come up with a language that has symbols "$+$", "$=$" and "$0$", "$1$", "$2$". Then we can assign to each symbol an actual objects, for example we will say that "$+$" will represent $f$, "$=$" will represent $E$ and each of "$0$", "$1$", "$2$" will represent $a,b,c$ respectively. Now we can say that the sentence "$2+1=3$" is true in the world $(S,f,E,a,b,c)$ exactly when $(f(b,a),c)\in E$. In practice we try to use the same symbols for similar functions and relations and this is why we reserve the symbol "$=$" for the diagonal relation.