Formula use:
\left(a-b\right)^3=a^3-b^3-3.a.b.\left(a-b\right)
\left(a-b\right)^3=a^3-3a^2b+3ab^2-b^3
Explanation
Here, given expression is :
\left(3p-8q\right)^3-\left(2p-7q\right)^3-3(3p-8q)\ (2p-7q)\ (p-q)
Let,
\left(3p-8q\right)=a
\left(2p-7q\right)=b
Now, if we subtract ‘b’ from ‘a’, we get :
\left(a-b\right)
\rightarrow\{\left(3p-8q\right)-\left(2p-7q\right)\}
\rightarrow\left(3p-8q-2p+7q\right)
\rightarrow\left(p-q\right)
\therefore\left(p-q\right)=\{\left(3p-8q\right)-\left(2p-7q\right)\}
Now, Simplify the expression :
\left(3p-8q\right)^3-\left(2p-7q\right)^3-3(3p-8q)\ (2p-7q)\ (p-q)
\rightarrow\left(3p-8q\right)^3-\left(2p-7q\right)^3-3.(3p-8q).(2p-7q).\{\left(3p-8q\right)-\left(2p-7q\right)\}
So that, we get :
a^3-b^3-3.a.b.\left(a-b\right)
\rightarrow\left(a-b\right)^3
\rightarrow\{\left(3p-8q\right)-\left(2p-7q\right)\}^3
\rightarrow\left(p-q\right)^3
\therefore p^3-3p^2q+3pq^2-q^3
Ans: p^3-3p^2q+3pq^2-q^3\ .