Solution:
Concept: A bracket that appears in every term is itself a common factor, so it can be taken out just like a number or a letter: pA+qA=A(p+q).
Step 1 — Take out the common bracket.
Each of the three terms contains (a+2b); the last term is (a+2b)(a+2b).
(a+2b)(3a+b)−(a+b)(a+2b)+(a+2b)2=(a+2b)[(3a+b)−(a+b)+(a+2b)]
Step 2 — Simplify the square bracket.
We open the brackets; the minus sign changes the signs of a and b.
(3a+b)−(a+b)+(a+2b)=3a+b−a−b+a+2b=3a+2b
Step 3 — Write the product.
The two brackets together give the factorised form.
(a+2b)(3a+b)−(a+b)(a+2b)+(a+2b)2=(a+2b)(3a+2b)
Step 4 — Check by multiplying out.
We multiply the factors back together. Getting the original expression again shows that the factorisation is correct.
(a+2b)(3a+2b)=(a+2b)(3a+b)−(a+b)(a+2b)+(a+2b)2
Watch out: When a whole bracket is subtracted, every term inside it changes sign.
Therefore, (a+2b)(3a+b)−(a+b)(a+2b)+(a+2b)2=(a+2b)(3a+2b).