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