f(x) simply means function of x, so, for example, f(2) would mean put 2 where x appears in the function. If f(x)=x+5, then f(2)=7 because we replaced x with 2 then added 5.
To find the inverse function, let y=f(x)=x+5; now write x in terms of y: y=5+x; y-5=x so x=y-5. Let g(y)=x=y-5.
We can replace y with x: g(x)=x-5, and g(x) is the inverse of f(x). So g(7)=2, and f(g(7))=7 and f(g(x))=x. That's how inverse functions work. Also, g(f(x))=x. Try it: put x=2, f(2)=7 and g(7)=2=x.