Answer:
Simplifying
px = qx + 5
Reorder the terms:
px = 5 + qx
Solving
px = 5 + qx
Solving for variable 'p'.
Move all terms containing p to the left, all other terms to the right.
Divide each side by 'x'.
p = 5x-1 + q
Simplifying
p = 5x-1 + q
Reorder the terms:
p = q + 5x-1