In "vertex" form ( I don't remember the formal name), the equation of a parabola is
y = a(x - b)^2 + c, which has a vertex at (b, c) since it shifts the parabola y = ax^2 over by b units to the left or right (depending on the sign of b) and then shifts it up or down by c units (depending on the sign of c), and the vertex of y = ax^2 starts at (0,0).
With this in mind, we can see that the vertex constrains the equation to be
y = a(x - 1)^2 + 2
Plugging in x = 2, we see
y = a(2 - 1)^2 + 2 = a*1+2 = -5 so a = -7. Thus,
y = -7(x - 1)^2 + 2