Consider the function $$h(t):=\int_0^t f(s)e^{t-s}ds\\ ,$$$$h(t):=\int_0^t f(s)e^{t-s}ds\,,$$ which solves the ODE $h'=h+f$ with $h(0)=0$, so $$h(t):=\int_0^t \Big(h(s)+f(s)\Big)ds\\ .$$$$h(t):=\int_0^t \Big(h(s)+f(s)\Big)ds\, .$$ Adding the term $-c\\ h(t)$$-c\, h(t)$ to both sides, your inequality takes a more familiar form of a Gronwall inequality: $$f(t)^2-c\;h(t)\le g(t)^2 + \int_0^t \Big(f(s)^2 -c\;h(s) \Big)ds $$ relative to the function $f(t)^2-c\; h(t)$.