For exercise a), f and g are the same function. So,

This means that f and g are inverse (i.e., f is the inverse of itself). In fact, if f(g(x)) = g(f(x)) = x, then f and g are inverse.
As for exercise b), you have


So, f and g are not inverse of each other.