Given
#color(white)("XXX")y=color(magneta)((x-3)^2)-2x^2-x-2#
Expanding
#color(white)("XXX")y=color(magenta)(x^2-6x+9)-2x^2-x-2#
and simplifying
#color(white)("XXX")y=-x^2-7x+7#
We would like to convert this into vertex form: #y=color(green)m(x-color(red)a)^2+color(blue)b#
with vertex at #(color(red)a,color(blue)b)#
First extract the #color(green)m# factor from the first 2 terms
#color(white)("XXX")y=color(green)(""(-1))(x^2+7x)+7#
Complete the square
#color(white)("XXX")y=color(green)(""(-1))(x^2+7xcolor(brown)(+(7/2)^2))+7color(brown)(-color(green)(""(-1))(7/2)^2)#
#color(white)("XXX")y=color(green)(""(-1))(x+7/2)^2+7+49/4#
#color(white)("XXX")y=color(green)(""(-1))(x-color(red)(""(-7/2)))^2+color(blue)(77/4)#
which is the vertex form with vertex at #(color(red)(-7/2),color(blue)(77/4))=(color(red)(-3 1/2),color(blue)(19 1/4))#