[proofplan]
We first put a smooth fibre metric on $E$, using paracompactness to assemble local Euclidean metrics by a smooth [partition of unity](/page/Partition%20of%20Unity). With this metric in hand, we define $G$ fibrewise as the orthogonal complement $F^\perp$. The main point is to verify that this fibrewise construction is smooth: locally, the metric gives a smooth projection from $E$ onto $F$, and the kernel of this projection is a smooth subbundle. Finally, the positive-definiteness of the metric gives the fibrewise direct-sum decomposition.
[/proofplan]
[step:Construct a smooth fibre metric on $E$]
Let $r=\operatorname{rank}E$. We first construct a smooth fibre metric
\begin{align*}
h_p:E_p\times E_p\to \mathbb{R},\qquad p\in M,
\end{align*}
on $E$.
Choose a smooth trivializing cover $\{U_a\}_{a\in A}$ of $E$, with smooth vector bundle trivializations
\begin{align*}
\Psi_a:E|_{U_a}\to U_a\times \mathbb{R}^r.
\end{align*}
Since $M$ is paracompact and smooth, choose a locally finite smooth partition of unity $\{\rho_a\}_{a\in A}$ subordinate to $\{U_a\}_{a\in A}$. Thus each $\rho_a:M\to [0,1]$ is smooth, $\operatorname{supp}\rho_a\subset U_a$, the family is locally finite, and
\begin{align*}
\sum_{a\in A}\rho_a(p)=1
\end{align*}
for every $p\in M$.
For $p\in U_a$, let
\begin{align*}
h_{a,p}:E_p\times E_p\to \mathbb{R}
\end{align*}
be the pullback of the standard Euclidean [inner product](/page/Inner%20Product) on $\mathbb{R}^r$ through the linear isomorphism on fibres induced by $\Psi_a$. More explicitly, if
\begin{align*}
\Psi_a(v)=(p,\xi),\qquad \Psi_a(w)=(p,\eta),
\end{align*}
with $\xi,\eta\in\mathbb{R}^r$, define
\begin{align*}
h_{a,p}(v,w)=\sum_{\ell=1}^r \xi_\ell\eta_\ell.
\end{align*}
Now define $h_p:E_p\times E_p\to \mathbb{R}$ by
\begin{align*}
h_p(v,w)=\sum_{a\in A}\rho_a(p)\,h_{a,p}(v,w).
\end{align*}
Terms with $\rho_a(p)=0$ are omitted. The sum is finite near each point because the partition of unity is locally finite, so $h$ is smooth in every local trivialization.
For each $p\in M$, the form $h_p$ is symmetric and bilinear because it is a finite linear combination of symmetric bilinear forms. If $v\in E_p$ and $v\neq 0$, then
\begin{align*}
h_p(v,v)=\sum_{a\in A}\rho_a(p)\,h_{a,p}(v,v).
\end{align*}
Every summand is non-negative. Since $\sum_a\rho_a(p)=1$, there exists $a\in A$ with $\rho_a(p)>0$; for this index, $h_{a,p}(v,v)>0$ because $h_{a,p}$ is positive definite. Hence $h_p(v,v)>0$. Therefore $h$ is a smooth fibre metric on $E$.
[/step]
[step:Define the candidate complement as the orthogonal complement of $F$]
For each $p\in M$, define
\begin{align*}
G_p=\{v\in E_p: h_p(v,w)=0 \text{ for every } w\in F_p\}.
\end{align*}
Let
\begin{align*}
G=\bigsqcup_{p\in M}G_p\subset E.
\end{align*}
We will prove that $G$ is a smooth vector subbundle of $E$ and that it is a fibrewise complement to $F$.
[/step]
[step:Express $G$ locally as the kernel of a smooth projection onto $F$]
Fix $p_0\in M$. Since $F\subset E$ is a smooth vector subbundle, there exists an open neighbourhood $U\subset M$ of $p_0$ and smooth sections
\begin{align*}
s_1,\dots,s_k:U\to F|_U
\end{align*}
forming a frame for $F|_U$, where $k=\operatorname{rank}F$. Shrinking $U$ if necessary, extend this frame to a smooth frame
\begin{align*}
s_1,\dots,s_k,e_{k+1},\dots,e_r:U\to E|_U
\end{align*}
for $E|_U$.
Define the smooth Gram matrix map $A:U\to \mathbb{R}^{k\times k}$ by requiring, for each $p\in U$, that
\begin{align*}
A(p)_{ij}=h_p(s_i(p),s_j(p))
\end{align*}
for $1\le i,j\le k$. For each $p\in U$, the vectors $s_1(p),\dots,s_k(p)$ are linearly independent and $h_p$ is positive definite, so $A(p)$ is a symmetric positive-definite matrix. Hence $A(p)$ is invertible for every $p\in U$, and the inverse matrix map
\begin{align*}
A^{-1}:U\to \mathbb{R}^{k\times k}
\end{align*}
is smooth.
Define a smooth bundle map over $U$
\begin{align*}
P:E|_U&\to F|_U
\end{align*}
as follows. For $v\in E_p$ with $p\in U$, set
\begin{align*}
P(v)=\sum_{i=1}^k\sum_{j=1}^k s_i(p)\,(A(p)^{-1})_{ij}\,h_p(v,s_j(p)).
\end{align*}
The map $P$ is smooth because it is written in local frames using smooth coefficient functions. For every $1\le m\le k$, the definition of $P$ gives
\begin{align*}
P(s_m(p))=\sum_{i=1}^k\sum_{j=1}^k s_i(p)\,(A(p)^{-1})_{ij}\,h_p(s_m(p),s_j(p)).
\end{align*}
Using the definition of $A(p)_{mj}$, this becomes
\begin{align*}
P(s_m(p))=\sum_{i=1}^k\sum_{j=1}^k s_i(p)\,(A(p)^{-1})_{ij}\,A(p)_{mj}.
\end{align*}
The matrix identity $A(p)^{-1}A(p)=I_k$, using symmetry of $A(p)$ to match the displayed indices, gives
\begin{align*}
P(s_m(p))=s_m(p).
\end{align*} Thus $P$ restricts to the identity on $F|_U$.
We now identify its kernel. If $v\in E_p$, then $P(v)=0$ if and only if, for every $1\le m\le k$,
\begin{align*}
0=h_p(P(v),s_m(p)).
\end{align*}
By the definition of $P$, the right-hand side is
\begin{align*}
\sum_{i=1}^k\sum_{j=1}^k (A(p)^{-1})_{ij}\,h_p(v,s_j(p))\,h_p(s_i(p),s_m(p)).
\end{align*}
Since $P(v)\in F_p$ and $P$ is the $h_p$-[orthogonal projection](/theorems/437) onto $F_p$, this is equivalent to
\begin{align*}
h_p(v,s_m(p))=0
\end{align*}
for every $1\le m\le k$. Because $s_1(p),\dots,s_k(p)$ form a basis of $F_p$, this is equivalent to $v\in G_p$. Therefore
\begin{align*}
G|_U=\ker P.
\end{align*}
[guided]
The goal is to show that the fibrewise definition of $G_p$ varies smoothly with $p$. A fibrewise orthogonal complement is automatically a vector subspace in each fibre, but smoothness of the collection of these subspaces requires a local frame.
Fix $p_0\in M$. Since $F$ is a smooth subbundle, choose an open neighbourhood $U\subset M$ of $p_0$ and a smooth local frame
\begin{align*}
s_1,\dots,s_k:U\to F|_U
\end{align*}
for $F|_U$, where $k=\operatorname{rank}F$. After shrinking $U$ within a bundle-trivializing neighbourhood for $E$, extend this to a smooth local frame
\begin{align*}
s_1,\dots,s_k,e_{k+1},\dots,e_r:U\to E|_U
\end{align*}
for $E|_U$.
The metric lets us project onto the span of $s_1,\dots,s_k$, but because this frame need not be orthonormal, we must correct by the Gram matrix. Define $A:U\to \mathbb{R}^{k\times k}$ by specifying its entries as
\begin{align*}
A(p)_{ij}=h_p(s_i(p),s_j(p)).
\end{align*}
For each $p\in U$, the matrix $A(p)$ is positive definite: if $\lambda=(\lambda_1,\dots,\lambda_k)\in\mathbb{R}^k$ is nonzero, then the vector
\begin{align*}
w=\sum_{i=1}^k\lambda_i s_i(p)
\end{align*}
is nonzero in $F_p$, and
\begin{align*}
\sum_{i=1}^k\sum_{j=1}^k \lambda_i A(p)_{ij}\lambda_j
=h_p(w,w)>0.
\end{align*}
Hence $A(p)$ is invertible for every $p\in U$. Since the entries of $A$ are smooth and matrix inversion is smooth on the [open set](/page/Open%20Set) of invertible matrices, $A^{-1}:U\to\mathbb{R}^{k\times k}$ is smooth.
Now define
\begin{align*}
P:E|_U&\to F|_U
\end{align*}
by
\begin{align*}
P(v)=\sum_{i=1}^k\sum_{j=1}^k s_i(p)\,(A(p)^{-1})_{ij}\,h_p(v,s_j(p)),
\end{align*}
for $v\in E_p$ and $p\in U$. This formula is the usual orthogonal projection formula in a non-[orthonormal basis](/page/Orthonormal%20Basis). It is smooth because the sections $s_i$, the metric coefficients $h_p(v,s_j(p))$, and the entries of $A^{-1}$ are smooth in the chosen local frame.
We verify that $P$ is the projection onto $F|_U$. For $1\le m\le k$, the definition of $P$ gives
\begin{align*}
P(s_m(p))=\sum_{i=1}^k\sum_{j=1}^k s_i(p)\,(A(p)^{-1})_{ij}\,h_p(s_m(p),s_j(p)).
\end{align*}
Using $A(p)_{mj}=h_p(s_m(p),s_j(p))$, we get
\begin{align*}
P(s_m(p))=\sum_{i=1}^k\sum_{j=1}^k s_i(p)\,(A(p)^{-1})_{ij}\,A(p)_{mj}.
\end{align*}
By $A(p)^{-1}A(p)=I_k$, with symmetry of $A(p)$ matching the displayed indices,
\begin{align*}
P(s_m(p))=s_m(p).
\end{align*}
Thus $P$ is the identity on $F_p$.
Finally, we compare $\ker P$ with the orthogonal complement. If $v\in E_p$ satisfies $P(v)=0$, then $P(v)$ has zero inner product with each basis vector $s_m(p)$. Since $P(v)$ is the unique element of $F_p$ with the same inner products against the basis vectors $s_m(p)$ as $v$, it follows that, for each $1\le m\le k$,
\begin{align*}
h_p(v,s_m(p))=0.
\end{align*} Hence $v$ is orthogonal to every vector in $F_p$, so $v\in G_p$. Conversely, if $v\in G_p$, then $h_p(v,s_j(p))=0$ for every $j$, and the defining formula gives
\begin{align*}
P(v)=0.
\end{align*}
Therefore $G|_U=\ker P$.
[/guided]
[/step]
[step:Build a smooth local frame for $G$]
For each $a\in\{k+1,\dots,r\}$, define a smooth section $g_a:U\to E|_U$ by
\begin{align*}
g_a(p)=e_a(p)-P(e_a(p)).
\end{align*}
Since $P(e_a(p))\in F_p$ and $P$ is the identity on $F_p$, we have
\begin{align*}
P(g_a(p))=P(e_a(p))-P(P(e_a(p)))=0.
\end{align*}
Thus $g_a(p)\in G_p$ for every $p\in U$.
We show that $g_{k+1},\dots,g_r$ form a frame for $G|_U$. First suppose
\begin{align*}
\sum_{a=k+1}^r c_a g_a(p)=0
\end{align*}
for [real numbers](/page/Real%20Numbers) $c_{k+1},\dots,c_r$. Then
\begin{align*}
\sum_{a=k+1}^r c_a e_a(p)
=
P\left(\sum_{a=k+1}^r c_a e_a(p)\right)\in F_p.
\end{align*}
Since
\begin{align*}
s_1(p),\dots,s_k(p),e_{k+1}(p),\dots,e_r(p)
\end{align*}
is a basis of $E_p$, the only linear combination of $e_{k+1}(p),\dots,e_r(p)$ lying in $F_p=\operatorname{span}\{s_1(p),\dots,s_k(p)\}$ is the zero vector. Hence $c_a=0$ for every $a$.
Now let $v\in G_p$. Write $v$ in the local frame for $E$:
\begin{align*}
v=\sum_{i=1}^k b_i s_i(p)+\sum_{a=k+1}^r c_a e_a(p).
\end{align*}
Since $v\in G_p=\ker P$, applying $P$ gives
\begin{align*}
0=P(v)=\sum_{i=1}^k b_i s_i(p)+\sum_{a=k+1}^r c_a P(e_a(p)).
\end{align*}
Therefore
\begin{align*}
\sum_{i=1}^k b_i s_i(p)=-\sum_{a=k+1}^r c_a P(e_a(p)).
\end{align*}
Substituting this into the expression for $v$ yields
\begin{align*}
v=\sum_{a=k+1}^r c_a\bigl(e_a(p)-P(e_a(p))\bigr).
\end{align*}
By the definition of $g_a$, this is
\begin{align*}
v=\sum_{a=k+1}^r c_a g_a(p).
\end{align*}
Thus $g_{k+1},\dots,g_r$ span $G_p$ and are linearly independent for every $p\in U$. Therefore $G$ is a smooth vector subbundle of $E$.
[/step]
[step:Verify the fibrewise direct-sum decomposition]
Fix $p\in M$. We prove
\begin{align*}
E_p=F_p\oplus G_p.
\end{align*}
First, if $v\in F_p\cap G_p$, then $v\in F_p$ and $v$ is orthogonal to every vector in $F_p$. Taking $w=v$ in the definition of $G_p$ gives
\begin{align*}
h_p(v,v)=0.
\end{align*}
Since $h_p$ is positive definite, $v=0$. Hence
\begin{align*}
F_p\cap G_p=\{0\}.
\end{align*}
Next let $v\in E_p$. Choose a neighbourhood $U$ of $p$ as above and use the local projection $P:E|_U\to F|_U$. Then
\begin{align*}
v=P(v)+(v-P(v)).
\end{align*}
The first term lies in $F_p$. The second term lies in $G_p$ because
\begin{align*}
P(v-P(v))=P(v)-P(P(v))=P(v)-P(v)=0.
\end{align*}
Therefore every $v\in E_p$ is a sum of an element of $F_p$ and an element of $G_p$. Together with the zero-intersection result, this proves
\begin{align*}
E_p=F_p\oplus G_p
\end{align*}
for every $p\in M$.
[/step]
[step:Identify the direct sum as a vector bundle isomorphism]
Define the fibrewise addition map $\Phi:F\oplus G\to E$ by
\begin{align*}
\Phi(u,v)=u+v.
\end{align*}
This map is smooth and fibre-preserving because addition in a smooth vector bundle is smooth. For every $p\in M$, the induced [linear map](/page/Linear%20Map)
\begin{align*}
\Phi_p:F_p\oplus G_p\to E_p
\end{align*}
is an isomorphism by the direct-sum decomposition just proved. Hence $\Phi$ is an isomorphism of smooth vector bundles. Therefore $G$ is a smooth complement to $F$ in $E$.
[/step]