Let $\tilde g(a,b)=(a,b)$ be the ``unnormalized'' version of $g$, define $\tilde f(x):=\tilde g(h_1(x),h_2(x))$, and note that $$ \frac12 L_D(\tilde f) \le L_D(f) \le L_D(\tilde f) $$ where the inequality holds coordinate-wise; this is because $\frac12\tilde g\le g\le\tilde g$. Analogously, $ \frac12 \hat L_S(\tilde f) \le \hat L_S(f) \le \hat L_S(\tilde f) $. Now let $m=\Theta(\frac{d}{\epsilon^2}\log\frac1\delta)$ be large enough to guarantee that $$ P\left\{ \sup_{h\in H} |L_D(h)-\hat L_S(h)|>\epsilon\right\}<\delta,$$ where $L_D(h),\hat L_S(h)$ are defined in the obvious way. Thus, with probability $1-\delta$, each component of $L_D(\tilde f)$ is $\epsilon$-close to its empirical counterpart and their $\ell_1$-distance is at most $2\epsilon$. It follows that for $m$ as chosen above, $$ P\left\{ \sup_{f\in F} ||L_D(f)-\hat L_S(f)|>2\epsilon\right\}<\delta. $$