I got this problem out the multiple choice section in my math book.

It said if $\displaystyle \frac {x+p}{(x-1)(x-3)}\equiv \frac {q}{x-1}+\frac{2}{x-3}$ what are the values of p and q?

Then I got another one that seem to be quite similar if $\displaystyle x^2+4x+p \equiv (x+q)^2+1$ what are the value of p and q? Trying to find two values is what that is confusing to me...

Can some one please help me with these problem?