### Theory:

To multiply a trinomial by a trinomial, you need to multiply each term of one trinomial by each terms of another trinomial and add the resulting products.

$\begin{array}{l}\left(a+b+c\right)\cdot \left(d+e+f\right)=\\ =a\cdot d+a\cdot e+a\cdot f+b\cdot d+b\cdot e+b\cdot f+c\cdot d+c\cdot e+c\cdot f\\ =\mathit{ad}+\mathit{ae}+\mathit{af}+\mathit{bd}+\mathit{be}+\mathit{bf}+\mathit{cd}+\mathit{ce}+\mathit{cf}\end{array}$
When degrees are multiplied with the same bases, their indicators add up.

${a}^{m}\cdot {a}^{n}={a}^{m+n}$
Example:
$\begin{array}{l}\phantom{\rule{0.147em}{0ex}}\left(7+b+c\right)\cdot \left(4{a}^{5}+2\mathit{ab}+{c}^{2}\right)\\ =7\cdot 4{a}^{5}+7\cdot 2\mathit{ab}+\mathit{7}{c}^{2}+b\cdot 4{a}^{5}+b\cdot 2\mathit{ab}+b\cdot {c}^{2}+c\cdot 4{a}^{5}+c\cdot 2\mathit{ab}+c\cdot {c}^{2}\\ =28{a}^{5}+14\mathit{ab}+\mathit{7}{c}^{2}+4{a}^{5}b+2a{b}^{2}+b{c}^{2}+4{\mathit{ca}}^{5}+2\mathit{abc}+{c}^{3}\end{array}$

$\begin{array}{l}\left(5\mathit{xy}-3{x}^{2}+z\right)\cdot \left({x}^{2}+y+1\right)=\\ =5\mathit{xy}\cdot {x}^{2}+5\mathit{xy}\cdot y+5\mathit{xy}\cdot 1-3{x}^{2}\cdot {x}^{2}-3{x}^{2}\cdot y-3{x}^{2}\cdot 1+z\cdot {x}^{2}+z\cdot y+z\cdot 1\\ =5{x}^{1+2}y+5x{y}^{1+1}+5\mathit{xy}-3{x}^{2+2}-3{x}^{2}y-3{x}^{2}+z{x}^{2}+\mathit{zy}+z\\ =5{x}^{3}y+5x{y}^{2}+5\mathit{xy}-3{x}^{4}-3{x}^{2}y-3{x}^{2}+z{x}^{2}+\mathit{zy}+z\end{array}$

Pay attention to the signs!

$\begin{array}{l}\left(5{x}^{2}y-x+{t}^{2}\right)\cdot \left(2{x}^{2}-y+t\right)=\\ \\ =5{x}^{2}y\cdot 2{x}^{2}+5{x}^{2}y\cdot \left(-y\right)+5{x}^{2}y\cdot t-x\cdot 2{x}^{2}-x\cdot \left(-y\right)-x\cdot t+{t}^{2}\cdot 2{x}^{2}+{t}^{2}\cdot \left(-y\right)+{t}^{2}\cdot t\\ \\ =5\cdot 2{x}^{2+2}y-5{x}^{2}{y}^{1+1}+5{x}^{2}\mathit{yt}-2{x}^{2+1}+\mathit{xy}-\mathit{xt}+2{x}^{2}{t}^{2}-{t}^{2}y+{t}^{2+1}\\ \\ =10{x}^{4}y-5{x}^{2}{y}^{2}+5{x}^{2}\mathit{yt}-2{x}^{3}+\mathit{xyxt}+2{x}^{2}{t}^{2}-{t}^{2}y+{t}^{3}\end{array}$