The vertex form is
There is some info in the question that can be used to our advantage. The best way to understand the axis of symmetry thing is to know that this is where the parabola meets its highest or lowest value (depending on the sign of 'a' in the beginning of the above equation). It meets its highest or lowest points whenever (x-h) = 0. This means the value at this point is only equal to whatever k is. If 'a' is positive this is a minimum, because (x-h)^2 is always positive and if a is positive then the function increases on either side of the axis of symmetry. If 'a' is negative you get the opposite effect.
Anyway, if we need (x-h) and we look at the point x = -1, then we need h to also be equal to negative one so that it is 0. (-1 - (-1)) = 0. This gives us our symmetry condition, and we also know that the max height is 6. That means when (x-h) = 0 the value of the function is k from the above equation, hence k = 6. Now we have everything except for the value of 'a'. The first thing we can tell is that it is negative. That is because the parabola has a maximum value. The coefficient 'a' determines whether there is a maximum or minimum.
Now, we have to figure out how to get 'a' such that it goes through the point (-2,1). To do that we can take our equation with the values of h and k that we have already figured out and solve for 'a' when x = -2 and y = 1:
Now we plug in the (x,y) values of interest:
then our final equation for the parabola is:
You can also plot this on desmos.com to see it for yourself.