In First Order Logic it's possible to convert a sentence to a set of clauses. When my prof. do it at the blackboard, for every clause he always renames the variables which have the same name among the clauses. Why is it correct to do this ?
Here a sentence (not shown) is converted in 3 clauses , and then the variables are renamed
Doing this for clauses is a specific instance of the general equivalence that where $\varphi(x)$ is any formula that does not contain $y$ as a free variable, and where $\varphi(y)$ is the result of replacing all of the free occurrences of $x$ with $y$:
$$\forall x \ \varphi(x) \Leftrightarrow \forall y \ \varphi(y)$$
OK, but why does that equivalence hold? Intuitively, it's because variables are just dummy placeholders. If I say that for any numbers $x$ and $y$ it is true that $x+y=y+x$ I am obviously not saying anything different from saying that for any numbers $m$ and $n$ it is true that $m+n=n+m$.
But, if you want a proof by formal semantics:
For any interpretation $I$ with domain $D_I$:
$$I \vDash \forall x \ \varphi(x) \text{ iff}$$
$$\text{ for all objects } d \in D_I: I \vDash \varphi[d] \text{ iff}$$
$$I \vDash \forall y \ \varphi(y)$$
where $I \vDash \varphi[d]$ is true iff $I' \vDash \varphi(d)$ where $I'$ is the extended interpretation that is just like $I$ but that also interprets a new constant $c$ as $I'(c)=d$, and where $\varphi(c)$ is the result of replacing all free variables $x$ in $\varphi(x)$ with $c$.