Can somebody explain how the inner product for two functions - say f = f(x) and g = g(x) is equal to
There is no need to explain how this is the inner product for two functions it is only necessary to show that this is an inner product (that is satisfies the properties in the definition of an inner product).
(The point is that there are more than one inner products definable on a real interval, what you have here is just the one you see most often, and is the nearest analog of the usual inner (scalar) product on )
CB