<s>[INST] Is this composition of polynomial correct? Suppose $p(x)=x^2+5x+3$ and $q(x)=3x^3-3x+7$. Write the expression $(q \circ p)(x)$ as a sum of terms, each which is a constant times the power of $x$.
Here is my work for the problem:
$(q\circ p)(x)=3(x^2+5x+3)^3-3(x^2+5x+3)+7$
$(q\circ p)(x)=3(x^6+125x^3+27)-3x^2-15x-9+7$
$(q\circ p)(x)=3x^6+375x^3+81-3x^2-15x-2$
$(q\circ p)(x)=3x^6+375x^3-3x^2-15x+79$
Did I do something wrong while working with this problem? The final answer I got wasn't in the multiple choice answers. I went over this problem 3 times and cannot find what I am doing wrong.
 [/INST] The mistake you made is assuming that $(a+b+c)^3=a^3+b^3+c^3$. Note that $(a+b+c)(a+b+c)=a^2+ab+ac+ba+b^2+bc+ca+cb+c^2$. Simplify and multiply by $a+b+c$ again to get the cube. Alternatively you can rewrite $q(x)=3x(x^2-1)+7$ and work from there.
</s>