Do ABCD là hình vuông nên AC vuông góc BD
Do đó:
\(P=\left(\overrightarrow{AB}+\overrightarrow{AC}\right)\left(\overrightarrow{BC}+\overrightarrow{BA}+\overrightarrow{BD}\right)=\left(\overrightarrow{AB}+\overrightarrow{AC}\right).2\overrightarrow{BD}\)
\(=2\overrightarrow{AB}.\overrightarrow{BD}+2\overrightarrow{AC}.\overrightarrow{BD}=2\overrightarrow{AB}.\overrightarrow{BC}=2a.a.cos135^0=-a^2\sqrt{2}\)