Answer
$g'(x)=2pr^{2}\ln a(2ra^{rx}+n)^{p-1}a^{rx}$
Work Step by Step
$g(x)=(2ra^{rx}+n)^p$
Differentiate using the chain rule:
$g'(x)=p(2ra^{rx}+n)^{p-1}(2ra^{rx}+n)'=...$
$...=p(2ra^{rx}+n)^{p-1}(2ra^{rx})'=...$
$...=2pr(2ra^{rx}+n)^{p-1}(a^{rx})'=...$
Use the chain rule one more time to find $(a^{rx})'$:
$...=2pr(2ra^{rx}+n)^{p-1}(a^{rx})(\ln a)(rx)'=...$
$...=2pr(2ra^{rx}+n)^{p-1}(a^{rx})(\ln a)(r)=...$
$...=2pr^{2}\ln a(2ra^{rx}+n)^{p-1}a^{rx}$