Formula use: \left(a+b\right)^3=a^3+3.a^2.b+3.a.b^2+b^3
Explanation
Here, given expression is : a^2b+b^2a
Now, we find the cubes with the help of formula :
\left(a^2b+b^2a\right)^3
\rightarrow\left(a^2b\right)^3+3.\left(a^2b\right)^2.b^2a+3.a^2b.\left(b^2a\right)^2+\left(b^2a\right)^3 [use formula]
\rightarrow a^6b^3+3a^3b^4+3a^4b^3+b^6a^3
Ans: a^6b^3+3a^3b^4+3a^4b^3+b^6a^3 .