As far as the example you quote is concerned, , any value of in the domain will produce an output from , but not every output can then be used as an input to : only those outputs that are themselves in .
So you need to ask yourself the question: What values of can I use as inputs for that will produce outputs in the range ? The answer will be given by the solutions to the equations and .
Raising to the power of both sides of each equation we get:
There's the domain of , then: