What is the vector space on which the inner product is defined? and what is the defined inner product for this problem?
My problem is : here in this problem, the inner product is defined between two functions $f,g$, so the vector space on which this inner product is defined, should be function space. but, to solve this problem, apparently we need to consider $ R^n $ as the vector space on which usual inner product is defined.

As the comment mentions, $f(t)$ and $g(t)$ are elements of $\mathbb{R}^n$, so $$\langle f(t), g(t) \rangle = \sum_{i=1}^n f_i(t)g_i(t)$$ Also, for spaces of functions, only the space of square integrable functions have an inner product structure.