Answer
$(p^{2}+q)(m+n^{5})$
Work Step by Step
$mp^{2} + n^{5}p^{2} + qm + qn^{5}$
Group the first two and last two terms together.
$(mp^{2} + n^{5}p^{2}) + (qm + qn^{5})$
Factor out the GCF from the first two and last two terms
$p^{2}(m+n^{5}) + q(m+n^{5})$
Take the common (m+n^{5}) and factor it out
$(p^{2}+q)(m+n^{5})$