I would use pascal's triangle
goes like this
0 1
1 1 1
2 1 2 1
3 1 3 3 1
the numbers on the left are the power of the binomial
baseically for the third power
(a+b)^3=1a^3b^0+3a^2+b^1+3a^1+b^2+1a^0+b^3
so you have
(8x+7)^3=1(8x)^3(7)^0+3(8x)^2(7)^1+3(8x)^1(7)^2+1(8x)^0(7)^3=
512x^3+1344x^2+1176x+343