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