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