Here is the general method:
(a+b)(c+d) = ac+ad+bc+bd
This is how multiply two binomials together.
Do the multiplication like this, then simplify as much as possible.
Here is how to do it for the first one:
(x+2)(x+7) = x*x + 2x + 7x + 2*7
Now we simplify:
x^2 + 9x + 14
I hope this helps you.
For the more complicated ones like 20, the process is similar but longer. You still multiply every term of the first one by every term of the second one.
20:
(x+5)(x^2 + 4x - 8) =
x*x^2 + x*4x + x*-8 + 5*x*2 + 5*4x + 5*-8
Now simplify the mess:
x^3 + 4x^2 - 8x + 5x^2 + 20x - 40
Simplify more:
x^3 + 9x^2 + 12x - 40