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