<s>[INST] solving for a coefficent term of factored polynomial. 
Given: the coefficent of $x^2$ in the expansion of $(1+2x+ax^2)(2-x)^6$ is $48,$ find the value of the constant $a.$

I expanded it and got
$64-64\,x-144\,{x}^{2}+320\,{x}^{3}-260\,{x}^{4}+108\,{x}^{5}-23\,{x}^{
6}+2\,{x}^{7}+64\,a{x}^{2}-192\,a{x}^{3}+240\,a{x}^{4}-160\,a{x}^{5}+
60\,a{x}^{6}-12\,a{x}^{7}+a{x}^{8}
$
because of the given info $48x^2=64x^2-144x^2$ solve for $a,$ $a=3$.
Correct?
P.S. is there an easier method other than expanding the terms?
I have tried using the bionomal expansion; however, one needs still to multiply the terms.  Expand $(2-x)^6$ which is not very fast.
 [/INST] You need not expand completely as only low powers play a role:
$(2-x)^6 = 2^6-6\cdot 2^5\cdot x + \frac{6\cdot5}2\cdot 2^4\cdot x^2+\ldots = 64-192x+240x^2+\ldots$
where the dots represent anything involving $x^3$ or even higher powers.
After this
$(1+2x+ax^2)(2-x)^6 = (64-192x+240x^2+\ldots) + (128x-384x^2+\ldots)+ (64 a x^2+\ldots) = 64 -64 x + (-144+64a)x^2+\ldots$
</s>