When determining the domain and range of a composition of functions, you need to pay attention to what happens at each step.
Read “Example 2” on pages 502 and 503 of the textbook to see another example of how the domain and range can be determined for a composition of functions. Note how any domain restrictions on the inner function as well as the outer function must be taken into consideration and combined to get the domain of the composite function.