The sum of two cubes refers to a special factoring formula: a^3 + b^3 = (a + b)(a^2 - ab + b^2). The a^3 and b^3 are the two cubes being added. For example, 27x^3 + 1 factors to (3x + 1)(9x^2 - 3x +1).
The difference of two cubes also has a special factoring formula: a^3 - b^3 = (a - b) (a^2 + ab + b^2).
For example, x^3 - 8 factors to (x - 2)(x^2 + 2x + 4).
Before factoring, rewrite the original problem as the sum or difference of two cubes. For the example above, rewrite x^3 - 8 as x^3 - 2^3. This facilitates applying the special factoring formulas.