We would set up the table as shown below
For each cell, we multiply the term for the row by the term for the column. By doing this, the first box is x * x = x^2. The second box is 3 * x = 3x
The third box is x * 2 = 2x
The fourth box is 3 * 2 = 6
By combining them, the equation would be
x^2 + 3x + 2x + 6
= x^2 + 5x + 6