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