Perhaps an easier way will be to use the Lagrange Interpolation Formula. Given $n$ points such that no two of them lies on a same vertical line, the formula guarantee the existence of a polynomial $P(x)$ such that $P(x)$ passes through these $n$ points and the degree of $P(x)$ is at most $n-1$.
Since 3 points are given, by using the formula, the polynomial formed will be at most degree of 2. Here is how the formula works:
Suppose the 3 points are $p_1 = (x_1 = 40, y_1 = 30), p_2 = (x_2 = 60, y_2 = 28), p_3 = (x_3 = 20, y_3 = 25)$. Now, form 3 polynomial $R_1(x), R_2(x), R_3(x)$ such that $R_1(x_1)=1, R_1(x_2)=R_1(x_3)=0$, $R_2(x_2)=1, R_2(x_1)=R_2(x_3)=0$ and $R_3(x_3)=1, R_3(x_1)=R_3(x_2)=0$. It is easy to see that
This $P(x)$ that we want to find is
And the rest are just algebra.
Generally, given $n$ points, $p_1, p_2, \cdots, p_n$, such that $p_i=(x_i, y_i)$, a polynomial $P(x)$ that passes through all these points is