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