∴|x+2|+| 1-x|+|y-5|+| 1+y|=9,
When x≥ 1 and y≥5, x+2+x-1+y-5+y+1= 9,
2x+2y= 12 x+y=6,
When 1 > x ≥-2 and 5 > y ≥- 1,
X+2+1-x+5-y+y+1= 9 but X+Y < 6,
When x
-x-2+ 1-x+5-y- 1-y=9,
-2x-2y=6 x+y=-3,
So the maximum value of x+y is 6 and the minimum value is -3.