Official solution
\[f(x) = \int_a^x {g(t)dt} \]
\[ \Rightarrow \] f'(x) = g(x)
\[ \Rightarrow \] f''(x) = g'(x)
Given, g(x).g'(x) = 0
\[ \Rightarrow \] f'(x).f''(x) = 0
Also given f(x) has exactly 5 roots.
So from Rolle's theorem we can say,
f'(x) has 4 roots and f''(x) has 3 roots.
\[ \therefore \] f'(x).f''(x) = 0 has 4 + 3 = 7 roots.