\[a^{4} + 6a^{2}b + 9b^{2} = \left( a^{2} + 3b \right)^{2} =\]
\[= \left( a^{2} + 3b \right)(a^{2} + 3b)\]