Equality in set theory In Introduction to Axiomatic Set Theory by G. Takeuti and W. M. Zaring chapter 3
It is given: Definition of equality as: $a=b \Leftrightarrow (\forall x)[x \in a \Leftrightarrow x \in b]$. 
And it is written this is incomplete in sense variable $x$ does not occur in $a = b$ and hence we have not made clear which of infinitely many formulas, equivalent under alphabetic change of variables, we intend $a=b$ to be abbreviation for. 
But the problem is easily resolved by specifying that $x$ is the first variable on our list of variables(given in alphabetical order) that is distinct from $a$ and $b$.
I get the point what problem is but didn't get point how it got resolved from last sentence
 A: I am not sure what the problem is. The formula has two free variables, $a,b$ and a bounded variable, $x$. The formula states that $a=b$ if and only if for every assignment into $x$, we have an element of $a$ if and only if we have an element of $b$.
We didn't write infinitely many formulas. Just one. And the axiom of extensionality is when we quantify over $a$ and $b$ with universal quantifiers.
The "problem" that we didn't specify whether $a$ is $x_1$ or $b$ is $x_2$ is nitpicky and seems like insisting on unnecessary details. Here's a rule of thumb:
Whenever the variables don't match the superstrict rules, we pick the least index possible each time. End of story. 
A: First of all, the standard convention in formalizing mathematical theories is that the universal quantifiers in front of formulas can be omitted.
See Sara Negri & Jan von Plato, Proof Analysis : A Contribution to Hilbert’s Last Problem (2011), page 41 :

Very many axioms are universal in form. They can be written either as universally quantified formulas, or as formulas with free parameters, as in the following axioms for equality:

$a=a \quad \quad \forall x (x=x)$.


If you want to be "totally formal", you have to follow the specifications of the language.
See Herbert Enderton, A Mathematical Introduction to Logic (2nd ed - 2001), page 69-on.
Thus the above definition can be rewritten as :

$\forall a \forall b [a=b \leftrightarrow \forall x(x \in a \leftrightarrow x \in b)]$.

If you want to "normalize" it according to the specifications [see EXAMPLES in the language of set theory, page 71] we have to write it as :

$(\forall v_1 (\forall v_2 (=(v_1,v_2) \leftrightarrow (\forall v_3(\in(v_3,v_1) \leftrightarrow \in(v_3,v_2))))))$.

This is the correct formula, according to Enderton's book.
As noted by Enderton, page 72 :


The finished product is not nearly as pleasant to read as the version that preceded it. As we have no interest in deliberately making life unpleasant for ourselves, we will eventually adopt conventions allowing us to avoid seeing the finished product at all.



Note
Your reference is to :

*

*Gaisi Takeuti & Wilson M.Zaring, Introduction to Axiomatic Set Theory, (2nd ed - 1982), page 7 :


Definition 3.1. $a = b \leftrightarrow (\forall  x)[x \in a \leftrightarrow x \in b]$.

We have to review language's specifications, page 4 :

The language of our theory consists of:
Free variables: $a_0, a_1, \ldots$,
Bound variables: $x_0, x_1, \ldots$,
A predicate symbol: $\in$,
[...]

We will use $a, b, c$, as metavariables whose domain is the collection of free variables, and we will use $x, y, z$, as metavariables whose domain is the collection of bound variables.


Thus, according to Takeuti's specifications, the formula is :


$[a_0 = a_1 \leftrightarrow (\forall x_0)[[x_0 \in a_0] \leftrightarrow [x_0 \in a_1]]]$.


Takeuti does not explicitly states the convention about universal closure of axioms.
Due to Axiom 5, page 6 :

$(\forall x)\varphi(x) \rightarrow \varphi(a)$

we can always rewrite the axiom prefixing the universal quantifiers in order to obtain a closed formula and then, by modus ponens, derive the "open" version of it.
