\[p\left( p^{2} - 2a \right) + a\left( 2p - a^{2} \right) =\]
\[= p^{3} - 2ap + 2ap - a^{3} =\]
\[= p^{3} - a^{3}.\]