(a²+3a)²+2(a²+3a)+1
=(a²+3a)²+(a²+3a)+(a²+3a)+1
=(a²+3a)(a²+3a+1)+(a²+3a+1)
=(a²+3a+1)(a²+3a+1)
=(a²+3a+1)²