well the matrix to extract the x-coordinate of a vector, i.e. [P] is

1 0

0 0

and [Q] would be

0 0

0 1

I don't know why you got 3x3 matrices when you're only working in a 2x2 space...hopefully it should work out for you now

also the first answer will be (5,7).P and the second answer will be (5,7).Q (i think anyway)