I am trying to understand a 'given' in Titchmarsh's third proof of the functional equation for Riemann's zeta function (E. C. Titchmarsh (1986). The Theory of the Riemann Zeta-function (2nd ed.). Oxford: Oxford Science Publications. Section 2.4, pp. 21-22, also quoted on the Wikipedia page for the zeta function here). The proof begins with the observation that for $\Re(s)>0$
$$\int_0^{\infty } x^{\frac{1}{2}s-1} e^{-n^2 \pi x} \, dx = \frac{\Gamma \left(\frac{s}{2}\right)}{n^s \pi ^{s/2}}$$
I realise it probably only requires basic algebra, but I don't understand how one gets to this statement from the definition of the gamma function
$$\Gamma (s) = \int_0^{\infty } x^{s-1} e^{-x} \, dx, \Re(s)>0$$
I reason as follows:
$$\begin{aligned} \Gamma \left(\frac{s}{2}\right) &= \int_0^{\infty } x^{\frac{1}{2}s-1} e^{-x} \, dx \\ \\ \frac{\Gamma \left(\frac{s}{2}\right)}{n^s \pi^{s/2}} &= \frac{1}{n^s \pi ^{s/2}} \int_0^{\infty } x^{\frac{1}{2}s-1} e^{-x} \, dx \\ \\ &= \int_0^{\infty } x^{\frac{1}{2}s-1} \frac{e^{-x}}{n^s \pi ^{s/2}} \, dx \end{aligned}$$
with the last step being justified because the integral is over $x$ and $\frac{1}{n^s \pi ^{s/2}}$ is therefore effectively a constant in relation to it.
But then I get lost, because it's obvious that $ n^{-s} \pi^{-s/2} e^{-x} \neq e^{-n^2 \pi x}$.
Could someone explain how the integral expression above for $\frac{\Gamma \left(\frac{s}{2}\right)}{n^s \pi^{s/2}}$ is derived?
Let $u=n^2 \pi x$, so the integral becomes
$$ \int_0^\infty dx \ x^{-1+s/2} e^{-n^2 \pi x} = \int_0^\infty \frac{du}{n^2 \pi} \left( \frac{u}{n^2\pi} \right)^{-1+s/2} e^{-u}=\frac{1}{(n^2\pi)^{s/2}} \int_0^\infty du \ u^{-1+s/2} e^{-u}$$
The integral on the right is $\Gamma(s/2)$, so we are left with
$$ \int_0^\infty dx \ x^{-1+s/2} e^{-n^2 \pi x} =\frac{1}{n^s \pi^{s/2}}\Gamma\left(\frac{s}{2}\right) $$$$\tag*{$\blacksquare$}$$