We have,
(x−1y2x2y−4)7÷(x3y−5x−2y3)−5=xp.yq
(x−3y6)7÷(x5y−8)−5=xp.yq
(x−21y42)÷(x−25y40)=xp.yq
x4.y2=xp.yq
So,
p=4,q=2
Therefore,
p+q=4+2=6
Hence, this is the answer.