I can't say how you got it wrong, since all I see is your answer. The stated answer is correct.
The binomial theorem for power 3 is this:
$\displaystyle (a + b)^3 = a^3 + 3 a^2 b + 3 a b^2 + b^3$
To really highlight the pattern, see that that can be written as:
$\displaystyle (a + b)^3 = (1)a^3 b^0 + (3) a^2 b^1 + (3) a^1 b^2 + (1) a^0 b^3$
(That's because anything is 1 times itself, and because anything (non-zero) raised to the zero power is 1.)
The pattern is: The powers of a start at 3 and drop by 1 with each term, ending at power = 0. The powers of b start at 0 and increase by 1 with each term, ending at power = 3.
The coefficient pattern is 1, 3, 3, 1.
Notice that the sum of the powers is 3 for each term. Notice that the formula is symmetric in order (because $\displaystyle (a + b)^3$ must equal $\displaystyle (b + a)^3$... and it does.)
Examples:
$\displaystyle (a + 0)^3 = (a)^3 + 3 (a)^2 (0) + 3 (a) (0)^2 + (0)^3$ $\displaystyle = a^3 + 0 + 0 + 0$ $\displaystyle = a^3$. (Check!)
$\displaystyle (a + (-a))^3 = (a)^3 + 3 (a)^2 (-a) + 3 (a) (-a)^2 + (-a)^3$ $\displaystyle = a^3 - 3a^3 + 3a^3 - a^3$ $\displaystyle = 0$. (Check!)
$\displaystyle (x + 1)^3 = (x)^3 + 3 (x)^2 (1) + 3 (x) (1)^2 + (1)^3 = x^3 + 3x^2 + 3x + 1$.
$\displaystyle (x - 1)^3 = (x)^3 + 3 (x)^2 (-1) + 3 (x) (-1)^2 + (-1)^3 = x^3 - 3x^2 + 3x - 1$.
$\displaystyle (x + 2)^3 = (x)^3 + 3 (x)^2 (2) + 3 (x) (2)^2 + (2)^3 = x^3 + 6 x^2 + 12x + 8$.
$\displaystyle (x - 2)^3 = (x)^3 + 3 (x)^2 (-2) + 3 (x) (-2)^2 + (-2)^3 = x^3 - 6 x^2 + 12x - 8$.
$\displaystyle (5x - 4)^3 = (5x)^3 + 3 (5x)^2 (-4) + 3 (5x) (-4)^2 + (-4)^3$ $\displaystyle = 125x^3 - 300 x^2 + 240x - 64$.
(Check: $\displaystyle 5^3 = 125, (3)(5)^2(-4) = -300, (3)(5)(-4)^2 = 240, (-4)^3$ $\displaystyle = -64$
$\displaystyle (2 + 1)^3 = (2)^3 + 3 (2)^2 (1) + 3 (2) (1)^2 + (1)^3 = 8 + 3(4) + 6 + 1$ $\displaystyle = 8 + 12 + 7$ $\displaystyle = 20 + 7$ $\displaystyle = 27$.
(Note that $\displaystyle 3^3 = 3(3)^2 = 3(9) = 27$. Check!)
$\displaystyle (3 + 1)^3 = (3)^3 + 3 (3)^2 (1) + 3 (3) (1)^2 + (1)^3 = 27 + 3(9) + 9 + 1$ $\displaystyle = 27 + 27 + 10$ $\displaystyle = 54 + 10$ $\displaystyle = 64$.
(Note that $\displaystyle 4^3 = 4(4)^2 = 4(16) = 64$. Check!)
$\displaystyle (3 + 2)^3 = (3)^3 + 3 (3)^2 (2) + 3 (3) (2)^2 + (2)^3$ $\displaystyle = 27 + 3(9)(2) + 9(4) + 8$ $\displaystyle = 27 + 9(6) + 36 + 8$ $\displaystyle = 27 + 54 + 36 + 8$ $\displaystyle = 81 + 44$ $\displaystyle = 125$.
(Note that $\displaystyle 5^3 = 5(5)^2 = 5(25) = 125$. Check!)