Answer:
All together:
D:(-∞,∞)
R:(-∞,2]
Individually:
D: (-∞,-2], (-2,∞)
R: (-∞,-2], y=2
Explanation:
So the way I like to think about Domain and Range is that the Domain is the set of real numbers which can be put into a function and the Range is the set of real numbers which you can get out from a function.
Looking at your given function, it looks like the piece-wise parts are f(x)=x and f(x)=2. Neither one of the functions has domain restrictions (you can plug anything into the first and second without getting any mathematical errors [like a 0 in the denominator]). And since the graph shows arrows in each end, indicating infinite continuation of the curve, the Domain is (-∞,∞).
Now for the outputs of each function, we can see that you'll be getting any number out for the f(x)=x portion. But, the f(x)=2 portion will always give you 2 for any input. So the Range is (-∞,2).
Now I'm honestly not too sure what the HW is asking you to do with this info... for the first part, maybe they want the individual domain and range values for each piece of the piece-wise while the second part asks for the overall? You might know what it's asking better then me since it's your class.
I'll include the overall and individual answers above. Comment with any questions.