Answer
$p^{\prime}=-sinq-csc^2q$
Work Step by Step
Given that
$p=(1+csc q)cosq$
$\implies p=cosq+cscq\space cosq$
$p=cosq+cosq.\frac{1}{sinq}$ (because cscq and sinq are reciprocals)
$p=cosq+cotq$
Now differentiating both sides, we obtain:
$p^{\prime}=-sinq-csc^2q$