Suppose $p$ is the unique polynomial of degree $\leq 2$ that agrees with a function $f$ at points $a_1 < a_2 < a_3$. If the third derivative $f^{(3)}$ exists, and $x\in (a_1,a_3)$, then we can say that $f(x)-p(x) = \dfrac{f^{(3)}(c)}{3!}(x-a_1)(x-a_2)(x-a_3)$ for some $c\in (a_1, a_3)$ depending on $x$. A proof is to let $g(x):=(x-a_1)(x-a_2)(x-a_3)$, and consider the function $$h_x:t\mapsto (f(x)-p(x))g(t)-(f(t)-p(t))g(x).$$ $h_x$ is zero at $t=a_1, a_2, a_3$, and $x$, so by applying Rolle's theorem several times, we can find a point $c$ such that $h_{x}^{(3)}(c)=0$, and I claim that calculating the derivative at that point gives us what we want.
This result is useful since it allows us to bound the error $f-p$ by knowing something about the third derivative of $f$.
A similar tactic is to take the unique polynomial $p$ of degree $\leq 2$ such that $f(a_1)=p(a_1)$, $f(a_2)=p(a_2)$, and $f'(a_1)=p'(a_1)$. Notice that we can reach a similar result, $f(x)-p(x) = \dfrac{f^{(3)}(c)}{3!}(x-a_1)^2(x-a_2)$, with the same Rolle's theorem argument.
What if we consider the unique polynomial of degree $\leq 2$ such that $f(a_1)=p(a_1)$, $f(a_2)=p(a_2)$, and $f'(a_3)=p'(a_3)$, where $a_1<a_3<a_2$? (Note that in general we are only free to choose $a_3$ so long as $a_3 \neq \frac12 (a_1+a_2)$.) Then the Rolle's theorem argument can break down, because we get two zeroes of $h_x'$ in $(a_1,a_2)$, but we're not sure if one of them the same point as $a_3$. We need three distinct zeros of $h_x'$ to get what we need from the Rolle's theorem conclusion.
Is there a modification we can make in this case, or is there a way of getting a similar estimate for the error? What is the general rule for estimating the error of a polynomial which has the same derivative as a function, at a point where $f$ and $p$ do not necessarily agree?
Let's normalize so $f(-1) = p(-1) = 0$ and $f(1) = p(1) = 0$, and say we want $f'(a_3) = p'(a_3)$ where $a_3 \ne 0$. $p$ being quadratic, we have $p(x) = c (1 - x^2)$ for some constant $c$, and $p'(a_3) = -2 c a_3$, i.e. $c = - f'(a_3)/(2 a_3)$. If $a_3$ is very close to $0$ and $f'(0) \ne 0$, this forces $|c|$ to be very large, making $p(x)$ a very poor approximation for $f(x)$. So I don't see how you can get any kind of a useful bound for the error from $f'''$. Sharing the same derivative at a point where the function values don't have to agree does not improve the approximation.