we have the function
interval (0, infinite) -------> n(x)=-2x-2
interval (-infinire,0] -------> n(x)=1
Remember that
The domain of a function is the set of all possible values of x
The range of a function is the complete set of all possible resulting values of y after we have substituted the domain.
so
In this problem
The domain is all real numbers
see the attached figure to better understand the problem
the range is the interval (-infinite, -2) U [1]