we are given

firstly, we will simplify left side
and then we can compare it with right side
so, we can distribute


we have i on both sides
so,i will get cancelled


we can also write as

now, we can compare
and we get


now, we can solve for p and q
we get
.............Answer