Since x > 5, x - 3 is greater than zero, x + 2 is greater than zero, and x - 5 is greater than zero. Therefore:
y = (x - 3) + (x + 2) - (x - 5)
= x - 3 + x + 2 - x + 5
= 2x + 4
Since x < -2, x - 3 is less than zero, x + 2 is less than zero, and x - 5 is less than zero. Therefore:
y = -(x - 3) - (x + 2) - (x - 5)
= -x + 3 - x - 2 + x - 5
= -2x - 4
Since 3 <= x <= 5, x - 3 is greater than or equal to zero, x + 2 is greater than zero, and x - 5 is less than or equal to zero. Therefore:
y = (x - 3) + (x + 2) + (x - 5)
= 3x - 6