a) f(g) = (-8/x)/((-8/x)-5) = -8/(-8-5x), So the domain is all real values of x excluding x = -8/5, because the function is undefined there, as the denominator is zero.
b) g(f) = -8/(x/(x-5)) = -8(x-5)/x = (-8x+40)/x, So the domain is all real values of x excluding x = 0, because the function is undefined there, as the denominator is zero.
c) f(f) = (x/(x-5))/((x/(x-5))-5) = x/(x-(5(x-5))) = x/(x-5x+25) = x/(-4x+25), So the domain is all real values of x excluding x = 25/4, because the function is undefined there, as the denominator is zero.
d) g(g) = -8/(-8/x) = -8x/-8 = x, So the domain is all real values of x.