Consider a graph $G$ with $g(n)$ edges. $G$ has average degree $2g(n)/n$ so there is a vertex $v$ with degree at most $$\delta = \left\lfloor \frac{2g(n)}{n}\right\rfloor.$$ Since by assumption $G-v$ has the property, $g(n-1) \ge g(n)-\delta$. Now solve this inequality for $g(n)$.