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