Hi,
Usually in max(f(a),f(b)) or min((f(a),f(b)) questions, f(a) will be greater than f(b) till a certain point and f(b) will be greater than f(a) after this point. Therefore, to check the extreme values, we have to consider the point of intersection of f(a) and f(b).
In the given question, f(a) = x+2 and f(b) = 3-x.
We can obtain the point of intersection by equating the functions.
x+2 = 3-x
=> 2x = 1 and x=1/2.
After obtaining this point, we are checking which function has the greater value in each interval to confirm that the extreme value occurs at x=1/2.