The variable appearing in a definite integral is known as a dummy variable, which means $\int_a^b f(x)dx$ is the same thing as $\int_a^b f(t)dt$. Now this result comes from the fact that we are simply substituting $x=t$. If we substitute anything that is not equal to $x$, everything changes. For example,
Consider the following identity-
$$\int_a^bf(x) dx=\int_a^bf(a+b-x)dx $$
The following proof has been provided in my textbook-
Substitute $x=a+b-t$. Then,
$$\int_a^bf(x) dx=-\int_b^af(a+b-t)dt$$ The limits have changed because we have substituted a variable in place of $x$ which is strictly not equal to $x$
$$=\int_a^bf(a+b-t)dt$$
$$=\int_a^bf(a+b-x)dx$$
This is the step where I have the problem. The concept of dummy variable comes from the fact that we can substitute variable of integration=any variable. So in this case we are substituting $t=x$. But previously we had claimed that $x=a+b-t$. Isn't this a contradiction and thus not a proper proof?