Let $(f\circ g)(x) =x^4+2x^3-3x^2-4x+6$ and $g(x)=x^2+x-1$. Find $f(x)$, it seem to be $f$ will have the formula $f(x)=ax^2+bx+c$. Plugging $g(x)$ in $f(x)$, we get $$ f(x^2+x-1)=a(x^2+x-1)^2+b(x^2+x-1)+c= x^4+2x^3-3x^2-4x+6$$ by comparing the coefficients in both sides we found $a=1, b=-2,c=3$. I know what got is correct. My question is
Is there another way to do it?