\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
Consider a composite function $f\circ g$. Does the independent variable have to be the same in each function? That is $f(x)$ and $g(x)$?
Answer: you can choose any name for the independent variable. What counts here is that the composition is defined whenever the image of $g$ is contained in the domain of $f$. For instance imagine that $g$ maps the number of square meters of a flat in Venice into the price of such a flat per month. Then $f$ should act on the prices of flats per month (for instance $f$ may "send" a price of a flat per month into the salary that you are expected to earn.
In your example $f(x) = x^(2) + 4$ and $g(t) = 4t - 5$ you could have written also $f(x) = x^(2) + 4$ and $g(x) = 4x - 5$. You may also write (names of the variables are not important!)
$$\forall z\quad f\circ g (z)=f(g(z))=f(4z-5)=(4z-5)^2+4.$$
\end{document}