Solution:
Key idea: To evaluate a composite such as f(g(x)), work from the inside out: find the inner function's value (or expression) first, then put it into the outer function.
Step 1 — Part (i), f(g(0)). We find g(0) first, then add 5.
g(0)=0−3
g(0)=−3
f(−3)=−3+5
f(g(0))=2
Step 2 — Part (ii), g(f(0)). We find f(0) first, then square and subtract 3.
f(0)=5
g(5)=25−3
g(f(0))=22
Step 3 — Part (iii), f(g(x)). We put x2−3 into f, which adds 5.
f(g(x))=(x2−3)+5
f(g(x))=x2+2
Step 4 — Part (iv), g(f(x)). We put x+5 into g and expand the square.
g(f(x))=(x+5)2−3
g(f(x))=x2+10x+25−3
g(f(x))=x2+10x+22
Step 5 — Part (v), f(f(x)). Applying f twice adds 5 twice.
f(f(x))=(x+5)+5
f(f(x))=x+10
Step 6 — Part (vi), g(g(x)). We put x2−3 into g and expand the square.
g(g(x))=(x2−3)2−3
g(g(x))=x4−6x2+9−3
g(g(x))=x4−6x2+6
Step 7 — Part (vii), f(f(−5)). We find f(−5) first, then apply f again.
f(−5)=−5+5
f(−5)=0
f(f(−5))=f(0)
f(f(−5))=5
Step 8 — Part (viii), g(g(2)). We find g(2) first, then apply g again.
g(2)=4−3
g(2)=1
g(g(2))=g(1)
g(g(2))=1−3
g(g(2))=−2
Therefore, (i) 2, (ii) 22, (iii) x2+2, (iv) x2+10x+22, (v) x+10, (vi) x4−6x2+6, (vii) 5, (viii) −2.