[guided]The definition of $F$ is fibrewise: at each point $x\in M$, we take the orthogonal complement of $G_x=i_x(E'_x)$ inside the [inner product space](/page/Inner%20Product%20Space) $E_x$. The only issue is smoothness. A family of vector subspaces can be well behaved fibre by fibre and still fail to be a smooth subbundle, so we need an explicit local frame for $F$.
Work on an open set $U\subset M$ where $G|_U$ has a smooth frame
\begin{align*}
g_1,\dots,g_r\in \Gamma(G|_U).
\end{align*}
Shrink $U$ if necessary so that these sections can be completed to a smooth local frame
\begin{align*}
g_1,\dots,g_r,h_1,\dots,h_{n-r}\in \Gamma(E|_U)
\end{align*}
of $E|_U$. The bundle metric gives a smooth Gram matrix
\begin{align*}
B:U\to \mathbb{R}^{r\times r},
\qquad
B_{ab}(x):=\langle g_a(x),g_b(x)\rangle_E.
\end{align*}
Because $g_1(x),\dots,g_r(x)$ are linearly independent, $B(x)$ is positive definite for every $x\in U$. Hence $B(x)^{-1}$ exists, and its entries are smooth functions of $x$ by the adjugate formula
\begin{align*}
B(x)^{-1}=\frac{\operatorname{adj}(B(x))}{\det B(x)}.
\end{align*}
Here $\det B(x)>0$, so division by $\det B(x)$ is smooth on $U$.
Now define, for each $x\in U$, the map
\begin{align*}
P_x:E_x\to G_x
\end{align*}
by
\begin{align*}
P_x(v)
=
\sum_{a=1}^{r}\sum_{b=1}^{r}
g_a(x)\,(B(x)^{-1})_{ab}\,\langle v,g_b(x)\rangle_E.
\end{align*}
This is the usual formula for orthogonal projection onto the span of a non-orthonormal frame. To check it, take $w=\sum_{c=1}^{r}\lambda_c g_c(x)\in G_x$. Substituting this expression into the definition of $P_x$ gives
\begin{align*}
P_x(w)=\sum_{a=1}^{r}\sum_{b=1}^{r}\sum_{c=1}^{r}g_a(x)\,(B(x)^{-1})_{ab}\,\lambda_c\langle g_c(x),g_b(x)\rangle_E.
\end{align*}
Since $B_{cb}(x)=\langle g_c(x),g_b(x)\rangle_E$ and $B(x)$ is symmetric, the coefficient of $g_a(x)$ is the $a$-th component of $B(x)^{-1}B(x)\lambda$, where $\lambda=(\lambda_1,\dots,\lambda_r)$. Hence
\begin{align*}
P_x(w)=\sum_{a=1}^{r}\lambda_a g_a(x)=w.
\end{align*}
Thus $P_x$ fixes $G_x$. Also, for any $v\in E_x$ and any $1\le c\le r$,
\begin{align*}
\left\langle v-P_x(v),g_c(x)\right\rangle_E=\langle v,g_c(x)\rangle_E-\sum_{a=1}^{r}\sum_{b=1}^{r}(B(x)^{-1})_{ab}\,\langle v,g_b(x)\rangle_E\,\langle g_a(x),g_c(x)\rangle_E.
\end{align*}
Using $B_{ac}(x)=\langle g_a(x),g_c(x)\rangle_E$, this becomes
\begin{align*}
\left\langle v-P_x(v),g_c(x)\right\rangle_E=\langle v,g_c(x)\rangle_E-\sum_{a=1}^{r}\sum_{b=1}^{r}(B(x)^{-1})_{ab}\,\langle v,g_b(x)\rangle_E\,B_{ac}(x).
\end{align*}
The final sum equals $\langle v,g_c(x)\rangle_E$: in matrix notation it is the $c$-th component of $B(x)B(x)^{-1}\mu$, where $\mu=(\langle v,g_1(x)\rangle_E,\dots,\langle v,g_r(x)\rangle_E)$. Therefore
\begin{align*}
\left\langle v-P_x(v),g_c(x)\right\rangle_E=0.
\end{align*}
So $v-P_x(v)\in F_x$, and therefore $\ker P_x=F_x$.
To turn this into a smooth frame for $F$, define
\begin{align*}
f_\ell:U\to E|_U,
\qquad
f_\ell(x):=h_\ell(x)-P_x(h_\ell(x)),
\qquad
1\le \ell\le n-r.
\end{align*}
The sections $f_\ell$ are smooth because the sections $h_\ell$, the frame $g_a$, the metric coefficients, and the entries of $B^{-1}$ are smooth. Each $f_\ell(x)$ lies in $F_x$ by construction.
It remains to verify that these sections form a frame, not merely a spanning family. Let $v\in F_x$. Since
$g_1(x),\dots,g_r(x),h_1(x),\dots,h_{n-r}(x)$ is a basis of $E_x$, there are unique scalars $\alpha_a,\beta_\ell\in\mathbb{R}$ such that
\begin{align*}
v=\sum_{a=1}^{r}\alpha_a g_a(x)+\sum_{\ell=1}^{n-r}\beta_\ell h_\ell(x).
\end{align*}
Because $v\in F_x=\ker P_x$, we have $P_x(v)=0$. Therefore
\begin{align*}
v=v-P_x(v).
\end{align*}
Expanding the right-hand side in the chosen frame gives
\begin{align*}
v=\sum_{a=1}^{r}\alpha_a\bigl(g_a(x)-P_x(g_a(x))\bigr)+\sum_{\ell=1}^{n-r}\beta_\ell\bigl(h_\ell(x)-P_x(h_\ell(x))\bigr).
\end{align*}
Since $P_x(g_a(x))=g_a(x)$, this reduces to
\begin{align*}
v=\sum_{\ell=1}^{n-r}\beta_\ell f_\ell(x).
\end{align*}
Thus the $f_\ell(x)$ span $F_x$.
Finally, suppose
\begin{align*}
\sum_{\ell=1}^{n-r}\beta_\ell f_\ell(x)=0.
\end{align*}
Then
\begin{align*}
\sum_{\ell=1}^{n-r}\beta_\ell h_\ell(x)
=
P_x\left(\sum_{\ell=1}^{n-r}\beta_\ell h_\ell(x)\right)\in G_x.
\end{align*}
The left-hand side is also in the span of $h_1(x),\dots,h_{n-r}(x)$. Since the combined list
$g_1(x),\dots,g_r(x),h_1(x),\dots,h_{n-r}(x)$ is a basis of $E_x$, the intersection of the span of the $g_a(x)$ with the span of the $h_\ell(x)$ is $\{0\}$. Therefore all $\beta_\ell=0$. The sections $f_1,\dots,f_{n-r}$ are a smooth local frame for $F|_U$, and so $F$ is a smooth subbundle.[/guided]