My teacher solved this problem, but I don't know how he get that the: $$y_0-2y_1+y_2 = -2$$ $$-2y_0 + 2y_1 = 2$$ $$y_0 = 0$$
Here is the full example with solution, step by step:
$$y=2x-2x^2$$ $$y=2t-2t^2$$ $$y(t)=y_0 (1-t)^2+ y_1 2(1-t)t+y_2 t^2$$ $$y(t)=y_0 -2y_0+t^2 y_0+ 2ty_1-2t^2 y_1+y_2 t^2$$ $$y(t)=y_0 -2y_0+t^2 y_0+ 2ty_1-2t^2 y_1+y_2 t^2$$
$$y_0=0$$
$$-2y_0+2y_1=2$$ $$2y_1=2$$ $$y_1=1$$
$$y_0-2y_1+y_2=-2$$ $$-2+y_2=-2$$ $$y_2=0$$ $$V_0=\begin{bmatrix} 0 \\ 0 \end{bmatrix},V_1=\begin{bmatrix} 1/2 \\ 0 \end{bmatrix},V_2=\begin{bmatrix} 1 \\ 0 \end{bmatrix}$$