Solve for q P=q+r+s