Answer:
x = (r - q) / p.
Explanation:
Subtract q from both sides if positive or add q to both sides if negative. This gives you px + q - q = r - q, which simplifies to px = r - q.
Divide by p on both sides. This gives you px / p = (r - q) / p, which simplifies to x = (r - q) / p.