The domain of a function is all real values of x that can be substituted into an expression that makes the expression a real number. For fractional or rational functions, you cannot allow any value of x that makes the denominator 0 since we cannot divide by 0. so I'll do the second problem. The denominator x-4 cannot be 0. So what makes it 0 cannot be part of the domain, so x-4 =0 when x=4. So domain is all real number except 4.

The range is all possible outcomes of y. There are several ways to do this but the standard way that is taught in High School is to solve your equation for x and ask yourself the same question that you did for the domain, that is when is the denominator 0?

y = -4/(x-4) + 4

(y - 4) = -4/(x-4)

(y - 4)(x -4) = -4 by cross multiplying

(x -4) = -4/(y - 4)

x = -4/(y - 4) +4

So y cannot be 4.

Range is all real numbers except 4.

The domain of the first problem is easy.

Using the technique described above for the range you'd get

(y+2) =1/-x

(y+2)* -x = 1

-x = 1 /(y +2)

x = -1/(y +2)

therefore y+ 2 cannot be 0 and y cannot be -2.