start by expanding the exponent using the rule
[tex](a+b)^2=a^2+2ab+b^2[/tex]apply on the expression
[tex]\begin{gathered} (x+4)^2=x^2+2\cdot4\cdot x+4^2 \\ (x+4)^2=x^2+8x+16 \end{gathered}[/tex]bring to the first expression and simplify
[tex]\begin{gathered} x^2+8x+16-(x+4) \\ x^2+8x+16-x-4 \\ x^2+7x+12 \end{gathered}[/tex]