Since $g$ is $C^2$, $f$ is also $C^2$, so the Hessian matrix of $f$, denoted by $H(f)$, is well defined and continuous(which means all its entries are continuous functions), where $H(f)=\big(\dfrac{\partial^2f}{\partial y_i\partial y_j}\big)$. A sufficient condition for $f$ being convex on some open set $U$ is that $H(f)$ is always positive definite on $U$. This fact can be easily shown by using the following Talyor expansion of $f$ $f(y)=f(p)+f'(p)(y-p)+\dfrac{1}{2}(y-p)^tH(f)(p)(y-p)+o(\|y-p\|^2),$ where $v^t$ denotes the transpose of $v$.
Since $H(f)$ is continuous, it is positive definite at some point implies that it is positive definite in some neighborhood of this point, because a symmetric matrix is positive definite is equivalent to all its leading principal minors are positive. Therefore, it suffices to show that $H(f)$ is positive definite at $b$. Since $g(y)=g(b)+g'(b)(y-b)+o(\|y-b\|),$ $f(y)=(y-b)^tg'(b)^tg'(b)(y-b)+o(\|y-b\|^2),$ i.e. $H(f)(b)=2\,g'(b)^tg'(b)$. Because $g'(b)\in\mathrm{GL}(\mathbb{R}^m)$, $H(f)(b)$ is positive definite.