With simple elements such as x and 2, it's worth learning special products:
(a+b)^3 = a^3 + 3a^2b + 3a^b^2 + b^3
Thus,
(x+2)^3 = x^3 + 3*2x^2) + 3(x)(2)^2 + 2^3
which simplifies to x^3 + 6x^2 + 12x + 8. The coeff. of x^2 is 6.
You could also use Pascal's Triangle to help you figure the coefficients.