I have
$(2a + 1)(2b + 1)$
which apparently expands to
$4ab + 2a + 2b + 1$
and then can be written as
$2(2ab + a + b) + 1 \,.$
From where did we get the $4ab$ term?
I have
$(2a + 1)(2b + 1)$
which apparently expands to
$4ab + 2a + 2b + 1$
and then can be written as
$2(2ab + a + b) + 1 \,.$
From where did we get the $4ab$ term?
For this, an application of the distributive law gives us that for any $a,b,c,d \in \mathbb{R}$ that $(a + b)(c + d) = (ac + db + bc + bd)$. In this case we would then have, $(2a + 1)(2b + 1) = (2a)(2b) + (1)(2a) + (1)(2b) + (1)(1) = 4ab + 2a + 2b +1$ as desired.
Each term in the first set of brackets is multiplied by each term in the second set of brackets. So the "2a" in the first set of brackets is multiplied by "2b" in the second set of brackets: 2a multiplied by 2b = 4ab