the function g is written as the dependent variable and t will be the independent, when they say g(-2) it means that t= -2, replace on the function like this
[tex]\begin{gathered} g(t)=t^2+4t+4 \\ g(-2)=(-2)^2+4(-2)+4 \end{gathered}[/tex]solve the right side
[tex]\begin{gathered} g(-2)=4-8+4 \\ g(-2)=0 \end{gathered}[/tex]