Answer
$3a(p+q) \left( -3a-a^{2}p+a^2q+2p^2+4pq+2q^2 \right)$
Work Step by Step
$\bf{\text{Solution Outline:}}$
Get the $GCF$ of the given expression, $
-9a^2(p+q)-3a^3(p+q)^2+6a(p+q)^3
.$ Divide the given expression and the $GCF.$ Express the answer as the product of the $GCF$ and the resulting quotient.
$\bf{\text{Solution Details:}}$
The $GCF$ of the constants of the terms $\{
-9,-3,6
\}$ is $
3
.$ The $GCF$ of the common variable/s is the variable/s with the lowest exponent. Hence, the $GCF$ of the common variable/s $\{
a^2(p+q),a^3(p+q)^2,a(p+q)^3
\}$ is $
a(p+q)
.$ Hence, the entire expression has $GCF=
3a(p+q)
.$
Factoring the $GCF=
3a(p+q)
,$ the given expression is equivalent to
\begin{array}{l}\require{cancel}
3a(p+q) \left( \dfrac{-9a^2(p+q)}{3a(p+q)}-\dfrac{3a^3(p+q)^2}{3a(p+q)}+\dfrac{6a(p+q)^3}{3a(p+q)} \right)
.\end{array}
Using the Quotient Rule of the laws of exponents which states that $\dfrac{x^m}{x^n}=x^{m-n},$ the expression above simplifies to
\begin{array}{l}\require{cancel}
3a(p+q) \left( -3a^{2-1}(p+q)^{1-1}-a^{3-1}(p+q)^{2-1}+2a^{1-1}(p+q)^{3-1} \right)
\\\\=
3a(p+q) \left( -3a^{1}(p+q)^{0}-a^{2}(p+q)^{1}+2a^{0}(p+q)^{2} \right)
\\\\=
3a(p+q) \left( -3a(1)-a^{2}(p+q)+2(1)(p+q)^{2} \right)
\\\\=
3a(p+q) \left( -3a-a^{2}(p+q)+2(p+q)^{2} \right)
.\end{array}
Using $(a+b)^2=a^2+2ab+b^2$ or the square of a binomial, the expression above is equivalent to
\begin{array}{l}\require{cancel}
3a(p+q) \left( -3a-a^{2}(p+q)+2(p^2+2pq+q^2) \right)
.\end{array}
Using $a(b+c)=ab+ac$ or the Distributive Property, the expression above is equivalent to
\begin{array}{l}\require{cancel}
3a(p+q) \left( -3a-a^{2}p+a^2q+2p^2+4pq+2q^2 \right)
.\end{array}