I see no reason not to just do this by straightforward calculation.
Since the problem asks about , the obvious first thing to do is to square A!
I presume you know that I is the identity matrix: so that, for any q, and then and that must be equal to .
That is, we have the four equations, 5- q= 3p, 4= 2p, -4= -2p, and -3- q= -p. Solve those equations for p and q.