Let $f(x) = 5x+3$ and $g(x)=x^2-2$. What is $g(f(-1))$?
I need to find the value of $g(f(-1))$, which means I need to first plug in $-1$ into $f(x)$ and then plug in the result into $g(x)$. So let me start by finding $f(-1)$. I just replace $x$ with $-1$ in the formula for $f(x)$ and simplify: $f(-1) = 5(-1)+3 = -5+3 = -2$. Now I have $f(-1) = -2$, so I can plug that into $g(x)$. Again, I just replace $x$ with $-2$ in the formula for $g(x)$ and simplify: $g(-2) = (-2)^2-2 = 4-2 = 2$. Therefore, $g(f(-1)) = 2$.

