Understanding what it means is half the point of this question.
I suspect you have not transcribed the question completely exactly, down to the last punctuation mark, but it is understandable anyway.
What functions described this way mean is that e.g. f(x) = one thing, in this case (x + 1) for x that are in the range stated by the first condition, here 1<x<3, but f(x) = another thing, in this case... well you can fill this in yourself.
In this case if you look at it you'll find the two conditions match up such that f(x) is defined over the whole range of x from - to + infinity . That might not always be the case.
Then since you switch from one formula to another at some points, a function defined like this most often won't be continuous. It won't here for most a, b; you are asked to find the values of these where the function does match up at the points where the specification of the function changes. You seem to have done so.
I strongly recommend you draw a picture of of the |x - 2| ≥ 1 , in fact of the whole system and solution, then you will understand the situation much better and otherwise you are likely to make mistakes now and in future.