ANSWERS
a) Domain: x ∈ (-∞, -1) ∪ (-1, ∞)
b) Domain: x ∈ (-∞, 0) ∪ (0, ∞)
Step-by-step explanation
These compositions are:
a)

And
b)

To find the domain in each function we have to find the values that x cannot take. If there aren't any, then the domain is all real values.
For composition a) note that x is in the denominator as (x+1). As we know, for real numbers the denominator can't be 0, so that's our restriction:

Solving for x:

The domain for f º g is all real values except x = -1
For composition b) we have x in the denominator too, but it is alone. Therefore, as said before, x cannot be 0.