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}$$
We have two expressions for $y(t)$: $$ y(t) = y_0 - 2y_0 + t^2 y_0 + 2ty_1 - 2t^2 y_1 + y_2 t^2 $$ and $$ y(t) = 2t - 2t^2 $$ The first one can be re-arranged to give: $$ y(t) = -y_0 + (2y_1)t + (y_0 - 2y_1 + y_2)t^2 $$ For this polynomial to be identical with the second one (i.e. for the two curves to be the same), the coefficients of corresponding powers of $t$ must be equal. So \begin{align} \text{Coefficients of } t^0 \; &: \quad -y_0 = 0 \\ \text{Coefficients of } t \; &: \quad 2y_1 = 2 \\ \text{Coefficients of } t^2 \; &: \quad y_0 - 2y_1 + y_2 = -2 \\ \end{align}