[proofplan]
We define $F^\perp$ fibrewise using the bundle metric on $E$. The main point is to prove that these fibrewise orthogonal complements vary smoothly; locally this follows by writing an explicit smooth [orthogonal projection](/theorems/437) onto $\iota(F)$ using the inverse Gram matrix of a local frame. Once $F^\perp$ is known to be a smooth subbundle, finite-dimensional [inner product](/page/Inner%20Product) linear algebra gives the direct-sum decomposition in every fibre. Exactness then identifies $\ker \pi_p$ with $\iota_p(F_p)$, so $\pi$ restricts to a fibrewise isomorphism $F^\perp_p \to Q_p$, and local frames show that this fibrewise isomorphism is a smooth bundle isomorphism.
[/proofplan]
[step:Construct the fibrewise orthogonal complement]
For each $p \in M$, define
\begin{align*}
F^\perp_p := \{v \in E_p : g_p(v, \iota_p(w)) = 0 \text{ for every } w \in F_p\}.
\end{align*}
Let
\begin{align*}
F^\perp := \bigsqcup_{p \in M} F^\perp_p \subset E.
\end{align*}
Since $g_p$ is an inner product on the finite-dimensional real [vector space](/page/Vector%20Space) $E_p$ and $\iota_p: F_p \to E_p$ is injective by exactness, $F^\perp_p$ is the ordinary orthogonal complement of the subspace $\iota_p(F_p) \subset E_p$.
[/step]
[step:Produce smooth local frames for the orthogonal complement]
Fix $p_0 \in M$. Let $r := \operatorname{rank} F$ and $N := \operatorname{rank} E$. Choose an open neighbourhood $U \subset M$ of $p_0$ and a smooth local frame
\begin{align*}
s_1, \dots, s_r: U \to F
\end{align*}
for $F|_U$. For each $1 \leq i \leq r$, define the smooth section $e_i: U \to E$ by
\begin{align*}
e_i(p) := \iota_p(s_i(p)).
\end{align*} Since each $\iota_p$ is injective, $e_1(p), \dots, e_r(p)$ are linearly independent in $E_p$ for every $p \in U$.
After replacing $U$ by a smaller open neighbourhood of $p_0$, extend $e_1, \dots, e_r$ to a smooth local frame
\begin{align*}
e_1, \dots, e_N: U \to E
\end{align*}
for $E|_U$. Define the Gram matrix map $A: U \to \mathbb{R}^{r \times r}$ by the formula
\begin{align*}
A(p) = \big(g_p(e_i(p), e_j(p))\big)_{1 \leq i,j \leq r}.
\end{align*}
For every $p \in U$, the matrix $A(p)$ is positive definite because $e_1(p), \dots, e_r(p)$ are linearly independent and $g_p$ is an inner product. Hence $A(p)$ is invertible for every $p \in U$. The entries of $A^{-1}: U \to \mathbb{R}^{r \times r}$ are smooth because each entry of $A(p)^{-1}$ is a cofactor of $A(p)$ divided by $\det A(p)$, and $\det A(p) > 0$ on $U$.
Let $I_r \in \mathbb{R}^{r \times r}$ denote the identity matrix, and let $\delta_{ik}$ denote the Kronecker delta, so $\delta_{ik}=1$ if $i=k$ and $\delta_{ik}=0$ if $i \neq k$.
For each index $a$ with $r+1 \leq a \leq N$, define the smooth section $u_a: U \to E$ by
\begin{align*}
u_a(p) := e_a(p) - \sum_{i=1}^{r}\sum_{j=1}^{r} g_p(e_a(p), e_i(p))\, (A(p)^{-1})_{ij}\, e_j(p).
\end{align*}
For $1 \leq k \leq r$ and $r+1 \leq a \leq N$, bilinearity of $g_p$ gives
\begin{align*}
g_p(u_a(p), e_k(p)) = g_p(e_a(p), e_k(p)) - \sum_{i=1}^{r}\sum_{j=1}^{r} g_p(e_a(p), e_i(p))\, (A(p)^{-1})_{ij}\, g_p(e_j(p), e_k(p)).
\end{align*}
Since $g_p(e_j(p), e_k(p)) = A(p)_{jk}$, this becomes
\begin{align*}
g_p(u_a(p), e_k(p)) = g_p(e_a(p), e_k(p)) - \sum_{i=1}^{r}\sum_{j=1}^{r} g_p(e_a(p), e_i(p))\, (A(p)^{-1})_{ij}\, A(p)_{jk}.
\end{align*}
Using $A(p)^{-1}A(p) = I_r$, we obtain
\begin{align*}
g_p(u_a(p), e_k(p)) = g_p(e_a(p), e_k(p)) - \sum_{i=1}^{r} g_p(e_a(p), e_i(p))\, \delta_{ik} = 0.
\end{align*}
Thus $u_a(p) \in F^\perp_p$ for every $p \in U$.
The sections $u_{r+1}, \dots, u_N$ form a frame for $F^\perp|_U$. Indeed, if
\begin{align*}
\sum_{a=r+1}^{N} c_a u_a(p) = 0
\end{align*}
for real scalars $c_{r+1}, \dots, c_N$, then substituting the definition of $u_a(p)$ gives a linear relation among the frame vectors $e_1(p), \dots, e_N(p)$ whose coefficients of $e_a(p)$ for $a > r$ are exactly $c_a$. Since $e_1(p), \dots, e_N(p)$ are linearly independent, each $c_a = 0$. Hence $u_{r+1}(p), \dots, u_N(p)$ are linearly independent. Also,
\begin{align*}
\dim F^\perp_p = N-r,
\end{align*}
because $F^\perp_p$ is the orthogonal complement of the $r$-dimensional subspace $\iota_p(F_p)$ inside the $N$-dimensional [inner product space](/page/Inner%20Product%20Space) $E_p$. Therefore $u_{r+1}(p), \dots, u_N(p)$ form a basis of $F^\perp_p$ for every $p \in U$.
Since every point $p_0 \in M$ has such a neighbourhood $U$, the subset $F^\perp \subset E$ is a smooth vector subbundle of rank $N-r$.
[guided]
The subtle point is not the definition of $F^\perp_p$ in one fibre; finite-dimensional inner product spaces always have orthogonal complements. The point is smoothness as $p$ varies in $M$. We prove smoothness by constructing an explicit local frame for $F^\perp$.
Fix $p_0 \in M$. Let $r := \operatorname{rank} F$ and $N := \operatorname{rank} E$. Choose an open neighbourhood $U \subset M$ of $p_0$ on which $F$ is trivial, and choose a smooth local frame
\begin{align*}
s_1, \dots, s_r: U \to F
\end{align*}
for $F|_U$. For each $1 \leq i \leq r$, applying the bundle map $\iota$ to this frame gives the smooth section $e_i: U \to E$ defined by
\begin{align*}
e_i(p) := \iota_p(s_i(p)).
\end{align*} Exactness says that each fibre map $\iota_p: F_p \to E_p$ is injective, so $e_1(p), \dots, e_r(p)$ are linearly independent in $E_p$ for each $p \in U$.
We now extend these sections to a full local frame of $E$. After shrinking $U$ to a smaller open neighbourhood of $p_0$, choose smooth sections
\begin{align*}
e_{r+1}, \dots, e_N: U \to E
\end{align*}
such that
\begin{align*}
e_1, \dots, e_N: U \to E
\end{align*}
is a smooth local frame for $E|_U$. The shrinking is used only to keep the [linear independence](/page/Linear%20Independence) condition valid on one neighbourhood: in a local trivialisation of $E$, linear independence is detected by a nonzero minor, and the same minor remains nonzero on a sufficiently small open neighbourhood of $p_0$.
We want to replace the extra frame vectors $e_{r+1}, \dots, e_N$ by vectors orthogonal to $\iota(F)$. Define the Gram matrix map $A: U \to \mathbb{R}^{r \times r}$ by
\begin{align*}
A(p) := \big(g_p(e_i(p), e_j(p))\big)_{1 \leq i,j \leq r}.
\end{align*}
For every $p \in U$, this is the Gram matrix of the linearly independent vectors $e_1(p), \dots, e_r(p)$ in the inner product space $(E_p,g_p)$, so $A(p)$ is positive definite and therefore invertible. The entries of $A$ are smooth because $g$ and the sections $e_i$ are smooth. The entries of $A^{-1}: U \to \mathbb{R}^{r \times r}$ are also smooth: each entry of $A(p)^{-1}$ is a cofactor of $A(p)$ divided by $\det A(p)$, and the positive definiteness of $A(p)$ gives $\det A(p) > 0$ on $U$.
Let $I_r \in \mathbb{R}^{r \times r}$ denote the identity matrix, and let $\delta_{ik}$ denote the Kronecker delta, so $\delta_{ik}=1$ when $i=k$ and $\delta_{ik}=0$ when $i \neq k$.
For $r+1 \leq a \leq N$, define the smooth section $u_a: U \to E$ by
\begin{align*}
u_a(p) := e_a(p) - \sum_{i=1}^{r}\sum_{j=1}^{r} g_p(e_a(p), e_i(p))\, (A(p)^{-1})_{ij}\, e_j(p).
\end{align*}
This is the formula for subtracting from $e_a(p)$ its $g_p$-orthogonal projection onto the subspace spanned by $e_1(p), \dots, e_r(p)$. The formula is smooth because it is built from smooth sections, the smooth metric coefficients, and the smooth inverse matrix $A^{-1}$.
We verify the orthogonality directly. For $1 \leq k \leq r$, bilinearity of $g_p$ gives
\begin{align*}
g_p(u_a(p), e_k(p)) = g_p(e_a(p), e_k(p)) - \sum_{i=1}^{r}\sum_{j=1}^{r} g_p(e_a(p), e_i(p))\, (A(p)^{-1})_{ij}\, g_p(e_j(p), e_k(p)).
\end{align*}
Since $g_p(e_j(p), e_k(p)) = A(p)_{jk}$, this becomes
\begin{align*}
g_p(u_a(p), e_k(p)) = g_p(e_a(p), e_k(p)) - \sum_{i=1}^{r}\sum_{j=1}^{r} g_p(e_a(p), e_i(p))\, (A(p)^{-1})_{ij}\, A(p)_{jk}.
\end{align*}
Using $A(p)^{-1}A(p) = I_r$, we obtain
\begin{align*}
g_p(u_a(p), e_k(p)) = g_p(e_a(p), e_k(p)) - \sum_{i=1}^{r} g_p(e_a(p), e_i(p))\, \delta_{ik} = 0.
\end{align*}
Since $e_1(p), \dots, e_r(p)$ span $\iota_p(F_p)$, this proves $u_a(p) \in F^\perp_p$.
It remains to check that these sections span the whole orthogonal complement. Suppose
\begin{align*}
\sum_{a=r+1}^{N} c_a u_a(p) = 0
\end{align*}
for [real numbers](/page/Real%20Numbers) $c_{r+1}, \dots, c_N$. Expanding the definition of $u_a(p)$ expresses this as a linear relation among the basis vectors $e_1(p), \dots, e_N(p)$. The coefficient of $e_a(p)$ is $c_a$ for every $a > r$, so the linear independence of the frame forces $c_a = 0$ for every $a > r$. Thus $u_{r+1}(p), \dots, u_N(p)$ are linearly independent.
Finally, $\iota_p(F_p)$ has dimension $r$, so its orthogonal complement in the $N$-dimensional inner product space $E_p$ has dimension $N-r$. We have found $N-r$ linearly independent vectors in $F^\perp_p$, hence they form a basis. Therefore the sections $u_{r+1}, \dots, u_N$ are a smooth local frame for $F^\perp|_U$. Since the point $p_0$ was arbitrary, $F^\perp$ is a smooth vector subbundle of $E$.
[/guided]
[/step]
[step:Decompose each fibre as an orthogonal direct sum]
For each $p \in M$, the subspace $\iota_p(F_p) \subset E_p$ is finite-dimensional. Since $g_p$ is an inner product on $E_p$, the definition of the orthogonal complement in a finite-dimensional inner product space gives
\begin{align*}
E_p = \iota_p(F_p) \oplus F^\perp_p.
\end{align*}
The intersection is zero because if $v \in \iota_p(F_p) \cap F^\perp_p$, then $g_p(v,v)=0$, and positive definiteness of $g_p$ implies $v=0$. The dimension count gives spanning:
\begin{align*}
\dim \iota_p(F_p) + \dim F^\perp_p = r + (N-r) = N = \dim E_p.
\end{align*}
Therefore, as smooth subbundles of $E$,
\begin{align*}
E = \iota(F) \oplus F^\perp.
\end{align*}
[/step]
[step:Identify the orthogonal complement with the quotient bundle]
Define the restricted smooth bundle map $\rho: F^\perp \to Q$ by
\begin{align*}
\rho(v) := \pi(v).
\end{align*}
For each $p \in M$, the fibre map is
\begin{align*}
\rho_p := \pi_p|_{F^\perp_p}: F^\perp_p \to Q_p.
\end{align*}
Exactness gives
\begin{align*}
\ker \pi_p = \operatorname{im}\iota_p = \iota_p(F_p).
\end{align*}
Hence
\begin{align*}
\ker \rho_p = F^\perp_p \cap \ker \pi_p
= F^\perp_p \cap \iota_p(F_p)
= \{0\}.
\end{align*}
Thus $\rho_p$ is injective. Since the short exact sequence gives
\begin{align*}
\dim Q_p = \dim E_p - \dim F_p = N-r = \dim F^\perp_p,
\end{align*}
the injective [linear map](/page/Linear%20Map) $\rho_p: F^\perp_p \to Q_p$ is an isomorphism.
It remains only to record smoothness of the inverse. On a neighbourhood $U \subset M$ as in the preceding construction, the sections
\begin{align*}
u_{r+1}, \dots, u_N: U \to F^\perp
\end{align*}
form a smooth local frame for $F^\perp|_U$. For each $r+1 \leq a \leq N$, define the smooth section $q_a: U \to Q$ by
\begin{align*}
q_a(p) := \pi_p(u_a(p)).
\end{align*} Since $\pi$ and $u_a$ are smooth, each $q_a$ is a smooth section of $Q|_U$. Since each $\rho_p$ is an isomorphism, $q_{r+1}(p), \dots, q_N(p)$ form a basis of $Q_p$ for every $p \in U$. Thus $q_{r+1}, \dots, q_N$ is a smooth local frame for $Q|_U$, and in these frames the map $\rho$ is represented by the identity matrix. Therefore $\rho$ is a smooth vector-bundle isomorphism.
[/step]
[step:Assemble the splitting isomorphism]
Let $\Phi: F \oplus F^\perp \to E$ be the bundle map over $\operatorname{id}_M$ defined by fibrewise addition in $E$:
\begin{align*}
\Phi(w,v) := \iota(w) + v.
\end{align*} The fibre map
\begin{align*}
\Phi_p: F_p \oplus F^\perp_p \to E_p
\end{align*}
is an isomorphism because
\begin{align*}
E_p = \iota_p(F_p) \oplus F^\perp_p.
\end{align*}
We now justify smoothness of the inverse. On any neighbourhood $U \subset M$ carrying the local frames $s_1,\dots,s_r$ for $F|_U$ and $u_{r+1},\dots,u_N$ for $F^\perp|_U$, the frame
\begin{align*}
e_1,\dots,e_r,u_{r+1},\dots,u_N: U \to E
\end{align*}
represents $\Phi$ by the identity matrix, because $e_i=\iota\circ s_i$ for $1\leq i\leq r$ and $\Phi(s_i,0)=e_i$, while $\Phi(0,u_a)=u_a$ for $r+1\leq a\leq N$. Hence the inverse is represented in these local frames by the identity matrix as well, so $\Phi$ is a smooth vector-bundle isomorphism. Since
\begin{align*}
\rho = \pi|_{F^\perp}: F^\perp \to Q
\end{align*}
is also a smooth vector-bundle isomorphism, replacing $F^\perp$ by $Q$ through $\rho$ gives a smooth vector-bundle isomorphism
\begin{align*}
F \oplus Q \cong E.
\end{align*}
This proves the asserted splitting of the short exact sequence.
[/step]