In this example we are multiplying two binomials so FOIL method can be used.
$$ \begin{aligned} \left( \color{blue}{ x^3+8}\right) \cdot \left( \color{orangered}{ x-2}\right) &= \underbrace{ \color{blue}{x^3} \cdot \color{orangered}{x} }_{\text{FIRST}} + \underbrace{ \color{blue}{x^3} \cdot \left( \color{orangered}{-2} \right) }_{\text{OUTER}} + \underbrace{ \color{blue}{8} \cdot \color{orangered}{x} }_{\text{INNER}} + \underbrace{ \color{blue}{8} \cdot \left( \color{orangered}{-2} \right) }_{\text{LAST}} = \\ &= x^4 + \left( -2x^3\right) + 8x + \left( -16\right) = \\ &= x^4 + \left( -2x^3\right) + 8x + \left( -16\right) = \\ &= x^4-2x^3+8x-16; \end{aligned} $$