You can
put this solution on YOUR website!
a2(a+1)-2a(a+1)+a+1
Put parentheses around the last two terms
a2(a+1)-2a(a+1)+(a+1)
Put a 1 in front of the last parentheses:
a2(a+1)-2a(a+1)+1(a+1)
Now you see that each term contains a (a+1)
a2(a+1)-2a(a+1)+1(a+1)
And you can factor out the red (a+1).
(a+1)(a2-2a+1)
Next, the black part factors:
(a+1)(a-1)(a-1)
or
(a+1)(a-1)2
or dropping the red coloring:
(a+1)(a-1)2
becomes
Edwin