Pass from polynomials to coordinate vectors:
$$v_1\to(1,1,1,1,0)\;,\;\;v_2\to(1,0,1,0,1)\;,\;\;v_3\to(0,1,0,1,0)\;,\;\;v_4\to(0,0,0,1,1)$$
Now form the corresponding matrix with the above as rows, and reduce the matrix (Gauss elementary operations):
$$\begin{pmatrix}
1&1&1&1&0\\
1&0&1&0&1\\
0&1&0&1&0\\
0&0&0&1&1\end{pmatrix}\stackrel{R_2-R_1}\longrightarrow\begin{pmatrix}
1&1&1&1&0\\
0&\!-1&0&\!-1&1\\
0&1&0&1&0\\
0&0&0&1&1\end{pmatrix}\stackrel{R_3-R_2}\longrightarrow\begin{pmatrix}
1&1&1&1&0\\
0&\!-1&0&\!-1&1\\
0&0&0&0&1\\
0&0&0&1&1\end{pmatrix}\stackrel{R_3\leftrightarrow R_4}\longrightarrow$$$${}$$
$$\longrightarrow\begin{pmatrix}
1&1&1&1&0\\
0&\!-1&0&\!-1&1\\
0&0&0&1&1\\
0&0&0&0&1\end{pmatrix}$$$${}$$
We see we get a matrix of rank $\;4\;$ and then the four vectors above, and thus the four original ones (the polynomials) as well, are linearly independent, and this means
$$\dim\text{ Span}\,\{v_1,v_2,v_3,v_4\}=4$$
Added after correction by the OP:
$$\begin{pmatrix}
1&1&1&1&1\\
1&0&1&0&1\\
0&1&0&1&0\\
0&0&0&1&1\end{pmatrix}\stackrel{R_2-R_1}\longrightarrow\begin{pmatrix}
1&1&1&1&0\\
0&\!-1&0&\!-1&0\\
0&1&0&1&0\\
0&0&0&1&1\end{pmatrix}\stackrel{R_3-R_2}\longrightarrow\begin{pmatrix}
1&1&1&1&0\\
0&\!-1&0&\!-1&0\\
0&0&0&0&0\\
0&0&0&1&1\end{pmatrix}\stackrel{R_3\leftrightarrow R_4}\longrightarrow$$$${}$$
and thus we get at once the dimension is three...
Best Answer
Solution:$$1+x+x^2=(1+x)+x^2$$ $$2+2x+x^2=2(1+x)+x^2$$ $$\mbox{$1+x+x^2$ and $2+2x+x^2$ can be expressed as a \\linear combination of $\{1+x,x^2\}$}$$ $$V=span(1+x,x^2,1+x+x^2,2+2x+x^2)$$ $$\Rightarrow V=span(1+x,x^2)$$ $$ \{1+x,x^2\} \mbox{ is linearly dependent and it spans V} $$ $$\mbox{Therefore basis of V is $\{1+x,x^2\}$}$$ $$\mbox{Dimension of V=2}$$