I am not sure why the below is not a Newton-Cotes formula but there is a hint given as below after the formulae.
$Q[f ; a, b]$ = $\tfrac{1}{2} f (a) + \tfrac{1}{3} f ( \frac{a+b}{2} ) + \tfrac{1}{4} f (b)$
Hint: (There is a short and clear answer, which does not require the explicit computation of Lagrange polynomials)
The Newton-Cotes formulas are based on polynomial interpolation, hence they are exact (by construction) for polynomials up to a certain degree (in this case, where we are using three points, degree 2). However, in this case, as it was pointed out in the comments to the OP, the formula isn't even exact, in general, for polynomials of degree 0:
$$\int_a^b 1 \cdot dx = b-a$$
$$Q[1; a, b] = \frac 12 + \frac 13 + \frac 14 = \frac{13}{12}.$$
Just for fun, we can try to see in which conditions could this formula have degree 2... The formula would only have degree $\ge 0$ if $b-a = \frac{13}{12}$. In that case, the degree would be 1 only if $$ Q[x; a, b]= \frac 12 a + \frac 13(a+b)+\frac 14 b=\frac 56 a+\frac{7}{12}b=\frac{91}{144}+\frac{17}{12}a = \int_a^b x dx = \frac{b^2-a^2}{2} $$
i.e. $ a = -\frac{13}{96}$. So, the formula would have degree $\ge 1$ only in the very special case $[a,b] = [-\frac{13}{96}, \frac{91}{96}]$.
Since this formula is not exact for polynomials of degree 2 we can state that not only the original formula is not, in general, exact for polynomials of degree 2, but also it is not exact in any circumstances.