One way to attack a problem like this is to try to transform it into something that is simpler to solve.
For this problem, we might want to try using different coordinate axes.
Rotating the horizontal axis would change how we identify the vertex of the parabola because the minimum or maximum "vertical" value would occur at a different point. Rotating the vertical axis would cause the parabola no longer to be the graph of a function. So let's keep the axes in the same orientation as the given $x$ and $y$ axes. But we can put the origin anywhere we want and scale either axis by any amount independently (possibly even reversing the positive direction) without changing how we identify the vertex.
The problem is relatively easy when the $y$-coordinates of both points are the same, because then $h = \frac{x_1 + x_2}2.$
So let's consider only the case in which $y_1 \neq y_2,$
and suppose we choose coordinate axes labeled $X$ and $Y$ such that the two points the parabola must pass through have $(X,Y)$ coordinates
$(-1,-1)$ and $(1,1).$
We can do this by setting
\begin{align}
X &= \frac{2}{x_2 - x_1}\left(x - \frac{x_1 + x_2}{2}\right), \tag1\\
Y &= \frac{2}{y_2 - y_1}\left(y - \frac{y_1 + y_2}{2}\right). \tag2
\end{align}
Then
\begin{align}
x &= \left(\frac{x_2 - x_1}{2}\right)X + \frac{x_1 + x_2}{2}, \\
y &= \left(\frac{y_2 - y_1}{2}\right)Y + \frac{y_1 + y_2}{2},
\end{align}
and the equation of the line $y = mx + b$ can be rewritten as
$$
\left(\frac{y_2 - y_1}{2}\right)Y + \frac{y_1 + y_2}{2}
= m\left(\frac{x_2 - x_1}{2}\right)X + m\left(\frac{x_1 + x_2}{2}\right) + b,
$$
that is, $Y = MX + B,$ where
\begin{align}
M &= \frac{mx_2 - mx_1}{y_2 - y_1}, \tag3\\
B &= \frac{mx_1 + mx_2 - y_1 - y_2 + 2b}{y_2 - y_1}. \tag4
\end{align}
Let the equation of the parabola in these coordinates be
$$Y = A(X - H)^2 + K. \tag5$$
Since the parabola passes through the points
$(X,Y) = (-1,-1)$ and $(X,Y) = (1,1),$
we know that
\begin{align}
-1 &= A(-1 - H)^2 + K = A(1 - 2H + H^2) + K, \\
1 &= A(1 - H)^2 + K = A(1 + 2H + H^2) + K, \\
-1 - 1 &= (A(1 + 2H + H^2) + K) - (A(1 - 2H + H^2) + K),\\
-2 &= 4AH,
\end{align}
from which we find that
$$
A = -\frac{1}{2H}. \tag6
$$
Solving for $K$ in Equation $(5),$
$$ K = 1 - A(1 - H)^2 = 1 + \frac{(1 - H)^2}{2H}
= \frac12\left(H + \frac1H\right). \tag7
$$
Therefore the vertex of the parabola has coordinates
$\left(H, \frac12\left(H + \frac1H\right)\right).$
In order for that point to lie on the line
$Y = MX + B,$ we require that
\begin{align}
\frac12\left(H + \frac1H\right) &= MH + B, \\
0 &= \left(M - \frac12\right) H + B - \frac1{2H} , \\
0 &= \left(M - \frac12\right) H^2 + BH - \frac12 .
\end{align}
In the case where $M = \frac12,$ this equation implies that
$H = -\frac{1}{2B}.$
This will lead to exactly one solution if $B\neq 0$;
the problem has no solution if $M = \frac12$ and $B = 0.$
But if $M \neq \frac12$ we have a quadratic equation in $H,$
whose solution (if it exists) is
$$
H = \frac{-B \pm \sqrt{B^2 + 2M - 1}}{2M - 1}. \tag8
$$
Note that if $M < \frac12$ there is a solution only if
$\lvert B\rvert \geq \sqrt{1 - 2M},$
and there is only one solution when $M < \frac12$
and $\lvert B\rvert = \sqrt{1 - 2M}$;
otherwise there are two solutions.
Now to apply this to the general problem, given the coordinates
$(x_1,y_1)$ and $(x_2,y_2)$ and the equation of the line $y = mx + b,$
we can take Equation $(5)$
and use Equations $(1)$ and $(2)$ to substitute for $X$ and $Y,$ obtaining
$$
\frac{2}{y_2 - y_1}\left(y - \frac{y_1 + y_2}{2}\right)
= A\left(\frac{2}{x_2 - x_1}
\left(x - \frac{x_1 + x_2}{2}\right) - H\right)^2 + K.
$$
Redistributing some factors, we get
$$
\frac{2}{y_2 - y_1}\left(y - \frac{y_1 + y_2}{2}\right)
= \frac{4A}{(x_2 - x_1)^2}
\left(x - \frac{x_1 + x_2}{2} - \frac{x_2 - x_1}{2}H\right)^2 + K
$$
and then
$$
y - \frac{y_1 + y_2}{2}
= \frac{2A(y_2 - y_1)}{(x_2 - x_1)^2}
\left(x - \frac{x_1 + x_2}{2} - \frac{x_2 - x_1}{2}H\right)^2
+ \frac{K(y_2 - y_1)}{2}
$$
and finally, by adding a constant to both sides,
$$
y = \frac{2A(y_2 - y_1)}{(x_2 - x_1)^2}
\left(x - \frac{x_1 + x_2}{2} - \frac{x_2 - x_1}{2}H\right)^2
+ \frac{K(y_2 - y_1) + y_1 + y_2}{2}. \tag9
$$
At this point you should be able to recognize which of these expressions
is $a,$ $h,$ and $k$ in the desired equation $y = a(x - h)^2 + k.$
To write this completely in terms of the variables $x$ and $y$
and the parameters $x_1,$ $y_1,$ $x_2,$ $y_2,$ $m,$ and $b$ given in the problem statement,
you could use Equations $(6)$ and $(7)$ to substitute for $A$ and $K,$
then use Equation $(8)$ to substitute for $H,$
and finally use Equations $(3)$ and $(4)$ to substitute for $M$ and $B.$
I would not recommend writing this result out in full detail, however;
it seems more practical to me to say the equation of the parabola is
Equation $(9)$ where $A,$ $H,$ and $K$ are defined by the equations above.
This enables plugging in actual numeric values to work examples.
In fact, I would even recommend introducing some additional symbols in
order to make Equation $(9)$ easier to work with:
\begin{align}
\bar x &= \frac{x_1 + x_2}{2}, & \delta_x &= \frac{x_2 - x_1}{2},\\
\bar y &= \frac{y_1 + y_2}{2}, & \delta_y &= \frac{y_2 - y_1}{2}.
\end{align}
Then Equation $(9)$ becomes
$$
y = \frac{A\delta_y}{\delta_x^2}\left(x - \bar x - H\delta_x\right)^2
+ K\delta_y + \bar y.
$$
Best Answer
Assuming Mark Dominus' interpretation of what you wrote, the fact that the parabola passes through the point $(1,2)$ tells you that if you plug in $x = 1$ and $y = 2$ into the general form of the parabola, the equation on the coefficients must be satisfied for your particular parabola. In this case, you get $2 = a(1)^2 + b(1) + c$ or $a + b + c = 2$. Similar reasoning with the other two points will produce for you two more equations involving $a, b, c$. Thus, you will obtain a system of three equations in three unknowns. Have you learned the techniques for solving such systems?