Let's look at the second binomial which is (3x + x + 3). Notice that there are two x's. You can combine them because they both have x. This is the key of combining like terms.
For instance, you have a problem such as: 3x + y. You cannot add both because both have different variables. Now back to the problem. 3x + x = 4x. Now, rewrite the problem which is: (4x + 3)
Now, the entire problem is: (3x + 5)(4x + 3).
Now, go ahead and use the FOIL method. You may ask what is the FOIL method? The key to understanding this method is to understand what each letter in the word 'FOIL' means.
F = First (“first” terms of each binomial are multiplied together)
O = Outer (“outside” terms are multiplied—that is, the first term of the first binomial and the second term of the second)
I = Inner (“inside” terms are multiplied—second term of the first binomial and first term of the second)
L = Last (“last” terms of each binomial are multiplied)
F = 3x * 4x = 12x2
O = 3x * 3 = 9x
I = 5 * 4x = 20x
L = 5 * 3 = 15
Now, rewrite the equation: 12x2 + 9x + 20x + 15
Recall what I said earlier about combining like terms. Two terms both have a single x so they can be added which would be 9x and 20x: 9x + 20x = 29x
The result is: 12x2 + 29x + 15