We have the expression
[tex]6(p + 6) - 3(p + 3)[/tex]
We expand each bracket first, to obtain,
[tex]6(p + 6) - 3(p + 3)=6p + 36 - 3p - 9[/tex]
Be mindful of the negative sign.
We now group like terms,
[tex]6(p + 6) - 3(p + 3)=6p - 3p + 36 - 9[/tex]
and then simplify to obtain,
[tex] 6(p + 6) - 3(p + 3)=3p + 27[/tex]