\(ab=\dfrac{\left(a+b\right)^2-a^2-b^2}{2}=\dfrac{13^2-89}{2}=\dfrac{80}{2}=40\)
\(P=\left(a+b\right)^3-3ab\left(a+b\right)=13^3-3\cdot40\cdot13=637\)
\(\left\{{}\begin{matrix}a+b=13\\a^2+b^2=89\end{matrix}\right.\)
\(\left(a+b\right)^2=169\)
\(a^2+2ab+b^2=169\)
\(ab=40\)
\(P=a^3+b^3=\left(a+b\right)^3-3ab\left(a+b\right)=13^3-3.40.13=637\)