a^3 + 1 + 3a(a+1) = a^3 + 3a^2 + 3a + 1 = (a + 1)^3
=(а+1)(а^2-а+1)+3а(а+1)=(а+1)(а^2-а+1+3а)=(а+1)(а^2+2а+1)=(а+1)(а+1)^2=(а+1)^3
a^3 + 1 + 3a(a+1) = a^3 + 3a^2 + 3a + 1 = (a + 1)^3
=(а+1)(а^2-а+1)+3а(а+1)=(а+1)(а^2-а+1+3а)=(а+1)(а^2+2а+1)=(а+1)(а+1)^2=(а+1)^3