Example 28

$\;\;\;(q^{3} + 1)^2$

$=(A + B)^2 \text{, where } A = q^{3} \text{ and } B = 1 $

$=A^2 + 2AB + B^2$

$=(q^{3})^2 + 2(q^{3})(1) + (1)^2 $

$=q^{6} + 2q^{3} +1 $