Explanation
The two terms we are multiplying are
The coefficients out front multiply to 2*4 = 8 which is the coefficient of the final answer shown above.
The 'a' terms have their exponents add to 2+1 = 3. Think of 4ab^2 as 4a^1b^2. This is why a^3 is part of the answer.
The b terms have their exponents add to 1+2 = 3. Think of 2a^2b as 2a^2b^1. This is why b^3 is part of the answer.
Overall the answer is 8a^3b^3