Hi Shaezy,
It is good to see you interacting here.
Your substitution is perfect, EP taught you well, it is your simplifying that is incorrect.
\(If \;\;f(x) = (1 − x)^2 \qquad g(x) = 9 − x,\\ find\;\; f(g(x)) \;\;and ;\;g(f(x)). \\\\~\\ g(f(x))= 9-(1-x)^2\)
So far so good. BUT
\(\text{This is NOT }(8-x)^2\\ \text{it is } \quad9-[(1-x)^2] \)
You have to expand the bracket and then take away ALL the terms from 9.
Have another go at it 