Discrete math question about surjective, injective function and domain, range

1) Lets say we have a function $f:X\to Y$ that has an inverse function. How do I find the function $I(x)={f}^{-1}(f(x))$ and how can I find the domain and range of I(x) ? This one is very confusing and I love an good explanation for it.

2) Prove that if f and g are both surjective, then g∘f is surjective. I think that I have to prove that its image is equal to its codomain, but I have no idea how to do this.

1) Lets say we have a function $f:X\to Y$ that has an inverse function. How do I find the function $I(x)={f}^{-1}(f(x))$ and how can I find the domain and range of I(x) ? This one is very confusing and I love an good explanation for it.

2) Prove that if f and g are both surjective, then g∘f is surjective. I think that I have to prove that its image is equal to its codomain, but I have no idea how to do this.