This is the problem 16 of Chapter 5 of Optimization be the vector space method, it is later used to prove the existence of Lagrange multipliers in equality constraint problems.
Let $g_1,g_2,\ldots, g_n$ be linearly independent linear functionals on a vector space $X$. Let $f$ be another linear functional such that for every $x$ satisfying $g_i(x)=0, i = 1,2,\ldots,n$ ,we have $f(x)=0$, show that there are constants $\lambda_1, \lambda_2, \ldots, \lambda_n$ such that $f = \sum_{i=1}^n\lambda_ig_i$.
I know it's supposed to use Hahn-Banach theorem, but I failed to figure out how.