(a)

Find the value of p and the value of q.