You keep making mistakes because you're not doing all the steps.

Here $\displaystyle r = \tan^3{(4p)} = [\tan{(4p)}]^3$.

It's a function of a function, so use the chain rule.

Let $\displaystyle u = \tan{(4p)}$ so that $\displaystyle r = u^3$.

$\displaystyle \frac{du}{dp} = \frac{4}{\cos^2{(4p)}}$

$\displaystyle \frac{dr}{du} = 3u^2 = 3\tan^2{(4p)}$.

So $\displaystyle \frac{dr}{dp} = \frac{12\tan^2{(4p)}}{\cos^2{(4p)}}$.