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