Consider the set of polynomials {$ x, 1 + x, x-x ^ 2 $} Determine if these polynomials form a basis for $ mathcal {P} _2 $.

I discovered that they are linearly independent and that the range of the matrix resulting from the polynomials is 3 and that the dimension of $ mathcal {P} _n $ is 3, but where do I go from there to make the connection that the set is the basis for $ mathcal {P} _n $? I know I must show that {$ x, 1 + x, x-x ^ 2 $} extends $ mathcal {P} _2 $ showing that one can write any polynomial of degree 2, $ alpha x ^ 2 + beta x + gamma $, as a linear combination of the elements in {$ x, 1 + x, x-x ^ 2 $} But I really don't know how to show that. This is what I got so far:

$ a (x) + b (1 + x) + c (x-x ^ 2) = (-c) x ^ 2 + (a + b + c) x + b (1) $

If I try to express a second degree polynomial $ alpha x ^ 2 + beta x + gamma $ In terms of a, b, c, I just found out $ gamma = b $, $ alpha = -c $, $ beta = a + b + c = a + gamma- alpha $. Isn't this a restriction for $ beta $? I don't know what to do with this information or if I'm going to do it the right way. Can somebody help me?