In any parabola, the vertex is the turning point. And the x-coordinate of the vertex can be found using
[tex]x_V=-\dfrac{b}{2a}[/tex]
So, in your case, you have
[tex]2=-\dfrac{a}{2}\iff a=-4[/tex]
So, your equation actually looks like
[tex]y=x^2-4x+b[/tex]
Now impose the passing through (2,1), i.e. substitute x=2, y=1 and solve for b:
[tex]1=4-8+b \iff b=5[/tex]