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