first, we have to see how this relates to the matrix A.
what does the matrix A do to a polynomial p(x) = ax^{2}+bx+c = [a,b,c] in the basis {x^{2},x,1}?
it takes [a,b,c] to [a-b+c,a+b+c,25a+5b+c].
note that p(-1) = a(-1)^{2} + b(-1) + c = a-b+c
p(1) = a+b+c
p(5) = a(5_{2}) + b(5) + c = 25a+5b+c.
so A takes p(x) to q(x) = p(-1)x^{2} + p(1)x + p(5).
suppose we are just given q(x), then to find p(x) we take A^{-1}(q(x)).
we are told by the problem that q(x) = -x^{2}+3x+31, which in our basis is [-1,3,31]. find A^{-1} of this vector.
(the fact that A is invertible means there is only ONE polynomial p(x) in P_{2} with this property).