Finding a formula for a linear map.

I have a question here that states:

Find a formula for the linear map T: P2(R) --> P1(R) such that

M(T, v1, v2, v3, w1, w2) = (the matrix) 1 -2 4

0 2 3

Here v1(x) = 1 + x, v2(x) = x², v3(x) = x² - 1, w1(x) = 1 - x and w2(x) = 4 + x

I hope i made that clear enough, tried my best.

This is what I have come up with:

T(v1) = 1(w1) + 0(w2) = 1 - x

T(v2) = -2(w1) + 2(w2)

= (-2 + 2x) + (8 + 4x) = -2 + 8 +2x + 4x

= 6 + 6x

T(v3) = 4(w1) + 3(w2)

= (4 - 4x) + (12 + 3x) = 4 - 4x + 12 + 3x

= 16 - x

T(x) = ?

v1 = 1 + x ==> T(v1) = 1 - x

v2 = X² ==> T(v2) = 6 + 6x

v3 = x² + 1 ==> T(v3) = 16 - x

T(x) ==> ?

Could anyone help me from there? Or if I am completely wrong, could someone put me in the right direction? I appreciate any help. Thanks.