Suppose we have some equality-candidate relation $"="$ and we want to check if it satisfies the axiom of substitution and we have some $n-variable$ function for that. Now do we have to check that
if $a=b$, then $f(x_1,x_2,...,a,...,x_n)=f(x_1,x_2,...,b,...,x_n)$ for every position from $1$ to $n$? For example if we have a relation-candidate $"="$ and we have defined what sum of integers $"+"$ means and regard it as two variable function, then do we need to prove that if $a=b$ then $+(a,c)=+(b,c)$ and $+(c,a)=+(c,b)$? What do we do in case of predicates-formulas?
Second question relates to lemma in Tao's Analysis section about constructing integers. So, what he does there is that he defines integers as ordered pairs $(a, b) ∈ N × N$ and places an equivalence relation $=$ on these pairs by declaring $(a, b) = (c, d)$ iff $a+d = c+b$. (Well, he uses a notation $(a,b)= a - b$ where sign $"-"$ doesn't mean anything. After checking that relation is indeed of equivalence he defines operations of sum and multiply on integers.
And proves lemma 4.1.3. that those operations are well-defined.
Lemma 4.1.3 (Addition and multiplication are well-defined). Let $a, b, a_0, b_0, c, d$ be natural numbers. If $(a - b) = (a_0−b_0)$, then $(a−b) + (c−d) = (a_0−b_0) +(c−d)$ and $(a−b) × (c−d) = (a_0−b_0)×(c−d)$, and also $(c−d)+(a−b) = (c−d)+(a_0−b_0)$ and $(c−d) × (a−b) = (c−d) × (a_0−b_0)$. Thus addition and multiplication are well-defined operations (equal inputs give equal outputs).
So, second question is what the point of that lemma(what "well-defined operations" means). If i understand correctly he just checks if our relation $"="$ for integers is suitable to be a relation of equality, showing in lemma that it satisfies the axiom of substitution for these operations.