Let f(x) = x^4+px^3+qx+5, where p, q are constants. The remainder when f(x) is divided by (x+1) is 7, and the remainder when f(x) is divided by (x-2) is 1. Find the value of p and the value of q.

Could someone solve it, please? I've been stuck on this problem for over two hours...