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