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