Write in vertex form

So firstly, put x^2 - 4x into parentheses: [tex] y=(x^2-4x)+6 [/tex]
Next, we need a perfect square inside the parentheses. Divide the x coefficent by 2 then square that result. In this case, -4 ÷ 2 = -2, (-2)²= 4. Add 4 inside the parentheses and then subtract 4 outside the parentheses:
[tex] y=(x^2-4x+4)+6-4\\y=(x^2-4x+4)+2 [/tex]
Lastly, factor what's inside the parentheses and your vertex form is [tex] y=(x-2)^2+2 [/tex]