\[8p - (3p + 8)(2p - 5) =\]
\[= 8p - \left( 6p^{2} - 15p + 16p - 40 \right) =\]
\[= 8p - \left( 6p^{2} + p - 40 \right) =\]
\[= 8p - 6p^{2} - p + 40 =\]
\[= - 6p^{2} + 7p + 40.\]