<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] Given that $f(1-x)=\frac{x^2-6x+2}{x+1}$
Put $x=1-u$, we get:
$f(u)=\frac{(1-u)^2-6(1-u)+2}{(1-u)+1}$
Set $u=-1$, we get:
$f(-1)=\frac{2^2-2\cdot 6+2}{2+1}=\frac{-6}{3}=-2$
</s>