Let's look first at $\int_{-1}^{1} f(t) \ dt$.
We want the formula to evaluate $\int_{-1}^{1} dt, \int_{-1}^{1} t \ dt, \int_{-1}^{1} t^{2} \ dt, \int_{-1}^{1} t^{3} \ dt, \int_{-1}^{1} t^{4} \ dt, \int_{-1}^{1} t^{5} \ dt, \int_{-1}^{1} t^{6} \ dt $ and $\int_{-1}^{1} t^{7} \ dt$ exactly.
That leads to the following system of equations:
$$ 2 = \omega_{0} + \omega_{1}$$
$$ 0 = \omega_{0} x_{0} + \omega_{1} x_{1}+ \omega_{2}+\omega_{3}$$
$$ \frac{2}{3} = \omega_{0} x_{0}^{2} + \omega_{1} x_{1}^{2} + 2 \omega_{2} x_{2} + 2 \omega_{3} x_{3}$$
$$ 0 = \omega_{0} x_{0}^{3} + \omega_{1} x_{1}^{3}+ 3 \omega_{2} x_{2}^{2} + 3 \omega_{3} x_{3}^{2} $$
$$ \frac{2}{5} = \omega_{0} x_{0}^{4} + \omega_{1} x_{1}^{4}+ 4 \omega_{2} x_{2}^{3} + 4 \omega_{3} x_{3}^{3} $$
$$0 = \omega_{0} x_{0}^{5} + \omega_{1} x_{1}^{5} + 5 \omega_{2} x_{2}^{4} + 5 \omega_{3} x_{3}^{4} $$
$$\frac{2}{7} = \omega_{0} x_{0}^{6} + \omega_{1} x_{1}^{6} + 6 \omega_{2} x_{2}^{5} + 6\omega_{3} x_{3}^{5} $$
$$ 0 = \omega_{0} x_{0}^{7} + \omega_{1} x_{1}^{7} + 7 \omega_{2} x_{2}^{6} + 7\omega_{3} x_{3}^{6}$$
Solve the system using a numerical solver.
Then use the the fact that $$\int_{a}^{b} f(x) \ dx = \frac{b-a}{2} \int_{-1}^{1} f \Big(a+(1+t)\frac{b-a}{2} \Big) \ dt$$
The formula is linear, so you just need to check that $Q(x^i) = I(x^i), i=0,1, \cdots$.So,
a)
$$
\begin{cases} Q(1) = I(1)\\ Q(x) = I(x)\end{cases} \Leftrightarrow
\begin{cases} w_0 + w_1 = 2\\ w_0 (-a) + w_1 a = 0\end{cases}
$$
The solutions are: i. $a=0$, with any $w_0,w_1$ such that $w_0+w_1=2$; ii. $w_0=w_1=1$, with any $a$.
b)
$$
\begin{cases} Q(1) = I(1)\\ Q(x) = I(x)\\Q(x^2=I(x^2)\end{cases} \Leftrightarrow
\begin{cases} w_0 + w_1 = 2\\ w_0 (-a) + w_1 a = 0 \\ w_0 a^2 + w_1 a^2 = \frac 23\end{cases}
$$
From last equation you get $a= \frac{\pm 1}{\sqrt{3}}$ and from the first two equations you then deduce that $w_0=w_1=1$.
Best Answer
We set up our functions: $$f(x)=1, f(x)=x^1, f(x)=x^2, f(x)=x^3$$ If we evaluate $\int_{-1}^{1}f(x) dx$ we get 2, 0, $\frac{2}{3}$, 0 respectively.
Thus we can set up our equations: $$w_0 (1) + w_1 (1) + w_2(1)=2$$ $$w_0 (-1) + w_1 (0) + w_2(1)=0$$ $$w_0 ((-1)^2) + w_1 (0^2) + w_2(1^2)=\frac{2}{3}$$ $$w_0 ((-1)^3) + w_1 (0^3) + w_2(1^3)=0$$
Solving this, we get $w_0=w_2$, $w_0=w_2=\frac{1}{3}$, $w_1=2(1-w_0)= \frac{4}{3}$.
And the Order of Convergence is equal to the degree of accuracy, so here $3$.