(x + 2)(x^{2} 2x + 3)
There are six possible products. We can start with the x and multiply it by all three terms in the other factor, and then do the same with the 2. It would look like this:
(x + 2)(x^{2} 2x + 3)
= (x)x^{2}(x)2x + (x)3 + (2)x^{2}(2)2x + (2)3
= x^{3} 2x^{2} + 3x + 2x^{2} 4x + 6
= x^{3} x + 6
This method can get hard to keep track of when there are many terms. There is, however, a more systematic method based on the stacked method of multiplying numbers:
Stack the factors, keeping like degree terms lined up vertically: 
_{} 
Multiply the 2 and the 3: 
_{} 
Multiply the 2 and the –2x: 
_{} 
Multiply the 2 and the x^{2}: 
_{} 
Now multiply the x by each term above it, and write the results down underneath, keeping like degree terms lined up vertically: 
_{} 

_{} 

_{} 
Then you just add up the like terms that are conveniently stacked above one another: 
_{} 
This stacked method is much safer, because you are far less likely to accidentally overlook one of the products, but it does take up more space on the paper.
Example:
ab(2a + 1) = ab(2a) + ab(1) = 2a^{2}b + ab
Because the situation of a binomial times a binomial is so common, it helps to use a quick mnemonic device to help remember all the products. This is called the FOIL method.
Example:
1. The F stands for first, which means the x in the first factor times the x in the second factor
2. The O stands for outer, which means the x in the first factor times the 3 in the second factor
3. The I stands for inner, which means the 2 in the first factor times the x in the second factor
4. The L stands for last, which means the 2 in the first factor times the 3 in the second factor
· Of course you would then combine the 3x + 2x into a 5x, because they are like terms, so the final result is
(x + 2)(x + 3) = x^{2} + 5x + 6