uploaded image

Question : For an energy signal x(t) with energy Ex, show that the energy of x(-t) is also Ex.

My problem : In the attached solutions l do not understand why they first substitute t1=-t and then a few lines later they substitute t1=t. Please explain this to me.