ok, this is what i have, but you may want to check my arithmetic, because i DO make mistakes:
the Cayley-Hamilton theorem tells us M satisfies its own characteristic equation, which is .
therefore: , or put another way:
the trouble is now how to express in terms of . to accomplish that, we write:
, so that evidently:
, and re-arranging:
substituting back in our original equation:
p = 23, q = -18, r = -40.