Problem with simple Linear Map from R3 to P1

I'm having a great deal of trouble seeing how the following map was done. It isn't even a problem but simply an example (#1.3) which can be seen on the page the following link leads to:

Linear Algebra/Representing Linear Maps with Matrices - Wikibooks, open books for an open world

the spaces are given to be http://upload.wikimedia.org/math/1/a...f2f03b1d9a.png

where the bases are

http://upload.wikimedia.org/math/7/7...c8218cd555.png

and the action of *h* on *B* is given by

http://upload.wikimedia.org/math/d/c...401efe0b08.png

and the final mapping is:

http://upload.wikimedia.org/math/f/a...733543aafa.png

which only makes some sense to me. I really don't know how to set the equations in D to map to these values and don't remember ever going over it in this book (specifically, moving from a space larger than the target space which is the case here, R3 --> P1). What's really confusing is the two negative maps for -x. I can see how maybe one is arrived at by this procedure:

1 + x

-1 + x

(1p --> 2p)

0 + 2x =

(where we then add our value from R3)

0 + 2x = - x

x = -1/2

??????

I don't believe this is correct but I really have no idea how this was done. I also notice that doing the dot product from the final maps to R3 gives us our initial values, for example:

-1/2*(1 + x) + -1/2*(-1 + x) =

(-1/2 - 1/2x) + (1/2 -1/2x) =

- 1/2x -1/2x =

-x

??? Please help!