First let’s simplify the first parenthetical term, -(x-4)^2, by distributing the negative sign and FOILing it.
-(x-4)^2
color(magenta)(\implies) (-x+4)(-x+4)
color(magenta)(\implies) x^2-4x-4x+16
color(magenta)(\implies) x^2-8x+16
Add that to the rest of the original expression:
color(red)(x^2)-color(blue)(8x)+color(green)(16)-color(blue)(12x)+color(green)(16)
color(magenta)(\implies) color(red)(x^2)-color(blue)(20x)+color(green)(32)
This is in standard form, ax^2+bx+c, so we can solve using the quadratic formula. Here,
x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
color(magenta)(\implies)x=\frac{20\pm\sqrt{(-20)^2-4(1)(32)}}{2(10)}
color(magenta)(\implies)x=\frac{20\pm\sqrt{400-128}}{2}
color(magenta)(\implies)x=\frac{20\pm\sqrt{272}}{2}
color(magenta)(\implies)x=\frac{20\pm 4\sqrt{17}}{2}
color(magenta)(\implies) x=10\pm 2\sqrt{17}
color(magenta)(\therefore) x_1\approx 18.24621\quad,\quad x_2\approx 1.75379