SOLUTION
We are given
[tex]\begin{gathered} f(x)=x^2-1 \\ g(x)=x+1 \end{gathered}[/tex]
We want to find
1. f(g(2))
This becomes
[tex]\begin{gathered} \text{First we have to find } \\ f\mleft(g\mleft(x\mright)\mright) \\ we\text{ will put }g\mleft(x\mright)\text{ into }f\mleft(x\mright),\text{ we have } \\ f(g(x))=(x+1)^2-1 \\ \text{puting }x=2\text{ into the above, we have } \\ f(g(2))=(2+1)^2-1 \\ f(g(2))=(3)^2-1 \\ f(g(2))=9-1 \\ f(g(2))=8 \end{gathered}[/tex]
Hence, the answer is 8
2. f(g(x)) from what we have above, we have
[tex]\begin{gathered} f(g(x))=(x+1)^2-1 \\ f(g(x))=(x+1)^{}(x+1)-1 \\ f(g(x))=x^2+x+x+1-1 \\ f(g(x))=x^2+2x+1-1 \\ f(g(x))=x^2+2x+0 \\ f(g(x))=x^2+2x \end{gathered}[/tex]
Hence, the answer is
[tex]f(g(x))=x^2+2x[/tex]
3. g(f(x))
[tex]\begin{gathered} We\text{ will put f}(x)\text{ into g}(x),\text{ we have } \\ g\mleft(f\mleft(x\mright)\mright)=(x^2-1)+1 \\ g(f(x))=(x^2-1^2)+1 \\ \text{Factorising (from difference of two squares we have } \\ g(f(x))=(x^{}-1)(x+1)+1 \\ g(f(x))=x^2+x-x-1+1 \\ g(f(x))=x^2+0+0 \\ g(f(x))=x^2 \end{gathered}[/tex]
Hence, the answer is
[tex]g(f(x))=x^2[/tex]
4.
[tex]\begin{gathered} (gog)(x) \\ We\text{ will put g}(x)\text{ into g}(x),\text{ we have } \\ (gog)(x)=(x+1)+1 \\ (gog)(x)=x+1+1 \\ (gog)(x)=x+2 \end{gathered}[/tex]
Hence, the answer is
[tex]x+2[/tex]
5.
[tex]\begin{gathered} (fof)(-1) \\ We\text{ first find }(fof)(x) \\ (fof)(x)=(x^2-1)^2-1 \\ (fof)(-1)=((-1)^2-1)^2-1 \\ (fof)(-1)=(1^{}-1)^2-1 \\ \mleft(fof\mright)\mleft(-1\mright)=\mleft(0\mright)^2-1 \\ (fof)(-1)=-1 \end{gathered}[/tex]
Hence, the answer is -1