Solve for p xp+yp=z