Use the Binomial expansion (note the exponents sum to the power in each term):
#(x+y)^3 = _3C_0x^3y^0 + _3C_1x^2y^1 +_3C_2x^1y^2 +_3C_3x^0y^3#
Remember #3! = 3*2*1 = 6#, #2! = 2*1 = 2#, #1! = 1# and #0! = 1#
#_3C_0 = (3!)/((3-0)!(0!)) = (3!)/((3)!1) = 1#
#_3C_1 = (3!)/((3-1)!(1!)) = (3!)/((2)!1) = (3*2!)/(2!) = 3#
#_3C_2 = (3!)/((3-2)!(2!)) = (3!)/((1)!2!) = (3*2!)/(2!) = 3#
#_3C_3 = (3!)/((3-3)!(3!)) = (3!)/(0!*3!) = 1#
Note: #(a-b)^3 = (a +(-b))^3#
Substitute into the Binomial expansion formula,
let #x = a# and #y = -b#:
#(a-b)^3 = a^3 + 3a^2(-b)^1 + 3a(-b)^2+(-b)^3#
#= a^3 - 3a^2b +3ab^2 -b^3#