I have the following set of polynomials:
$$Z=\{1+x+x^2,1-x+2x^2\}.$$

And I have to show that the set is linearly independent (which I've already got), and now I have to extend the set to form a basis of $P\_2[\mathbf{R}]$.

This is where I'm stuck, I know that the $\dim(P\_2[\mathbf{R}])=3$, so I only have to search for one more polynomial, but how do I do this? 

I tried:

${(a\_1+a\_2)}+{(a\_1-a\_2)}{x} +{(a\_1+{2}{a\_2})}{x^2} \in span(Z)$ 

Because I'm trying to solve for any polynomial in $P\_2[\mathbf{R}]$:
$${a\_1 + a\_2 = r\_1}$$
$${a\_1 - a\_2 = r\_2}$$
$${a\_1 + 2a\_2 = r\_3}$$

From which I got the matrix:
$$\begin{bmatrix} 1 & 1 & -1 & 0 & 0 \\ 1 & -1 & 0 & -1 & 0 \\ 1 & 2 & 0 & 0 & -1 \end{bmatrix}$$

Which I then reduced and got the basis for the column space of the matrix, and got the missing polynomial based on the coefficients of my last result. So I now have: 
$${\beta=\{1+x+x^2,1-x+2x^2,-1\}}$$

as a basis of $P\_2[\mathbf{R}]$.

The thing is, I'm not sure if my result is correct and if it is WHY did it work out like that...

Also, does anyone have an easier suggestion to attack this problem?

**P.S.**: Sorry if I put in to much information, this is my first question here.

Thanks!