Alex has originally [tex]3x+1[/tex] yards of silk.
Then he purchases [tex]x^2+5x+4[/tex] packages, each containing [tex](2x+1)[/tex] yards of silk, so he purchases a total of
[tex](x^2+5x+4)\cdot(2x+1)[/tex] yards of silk.
Distributing [tex](x^2+5x+4)[/tex] over [tex]2x[/tex], and 1 we have
[tex](x^2+5x+4)\cdot2x+(x^2+5x+4)\cdot+1=2x^3+10x^2+8x+x^2+5x+4[/tex]
[tex]=2x^3+11x^2+13x+4[/tex].
The original amount of silk, and the purchased amount are a total of
[tex]=2x^3+11x^2+13x+4 + (3x+1)=2x^3+11x^2+16x+5[/tex].
Of these, [tex]2x^3+8x^2+10x+4[/tex] are used. Thus, in the end the amount left is
[tex]available\ amount-used\ amount[/tex]:
[tex](x^3+11x^2+16x+5)-(2x^3+8x^2+10x+4)=-x^3+3x^2+6x+1[/tex]
Answer: [tex]-x^3+3x^2+6x+1[/tex] yards