The exercise wants us to prove that f(g(x)) = x and g(f(x)) = x, then let's prove it.
First, let's start with f(g(x)) = x. Let's do f(g(x)), we must find that it's equal to x.

Now we simplify that expression, then

Then we can confirm that f(g(x)) = x. Now let's do the same for g(f(x)), then

As we expected, it's also true, hence
