Solve for r 12-q+r=P