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