$B\in y$
$\Rightarrow a-b+2=6$
$\Leftrightarrow a=b+4$ (1)
$y_{\text{đỉnh}}=\dfrac{4a.2-b^2}{4a}=\dfrac{-1}{4}$
$\Leftrightarrow 8a-b^2=-a$
$\Leftrightarrow 9a-b^2=0$ (2)
Thay (1) vào (2):
$9(b+4)-b^2=0$
$\Leftrightarrow b^2-9b-36=0$
$\Leftrightarrow b=12$ hoặc $b=-3$
$\Rightarrow a=16$ hoặc $a=1$
Vậy $y=16x^2+12x+2$ hoặc $y=x^2-3x+2$