<s>[INST] Suppose $f \circ g(x) = \frac{x^2-6x+2}{x+1}$ and $g(x) = 1 - x$. Then $f(-1)$ is equal to... I tried to substitute the value of $g(x)$ to every $x$ in  $f \circ g(x) = \frac{x^2-6x+2}{x+1}$ and ended up with $\frac{x^2+4x-3}{-x+2}$.
Although honestly I do not know if that helps, or what I could do next.
I thought maybe this question just requires me to substitute $-1$ to every $x$ in $f\circ g(x) = \frac{x^2-6x+2}{x+1}$?
 [/INST] We have \begin{align*}f(-1) &= (f \circ g)(g^{-1}(-1)) \\ &= (f \circ g)(1-(-1)) \qquad \text{(as $g^{-1}(x)=1-x$)} \\ &= \frac{2^2-6\cdot 2 + 2}{2+1} \\ &= -2\end{align*}
</s>