[proofplan]
We construct local trivializations of $S(E)$ by first producing smooth local orthonormal frames for $E$. Starting from an arbitrary smooth local frame, the fibrewise [Gram-Schmidt process](/theorems/435) gives an orthonormal frame because all normalization factors are positive smooth functions. Each orthonormal frame identifies the unit vectors in every fibre with the standard sphere $S^{k-1} \subset \mathbb{R}^k$. On overlaps, two orthonormal frames differ by a smooth $O(k)$-valued transition function, and these restricted transition functions are exactly the transition functions of the sphere bundle.
[/proofplan]
[step:Construct smooth local orthonormal frames for the metric vector bundle]
Let $b_0 \in B$. Let $g$ denote the smoothly varying fibrewise [inner product](/page/Inner%20Product) on $E$, so for each $b \in B$ the map $g_b:E_b \times E_b \to \mathbb{R}$ is an inner product and depends smoothly on $b$ in local vector bundle trivializations. Since $\pi:E \to B$ is a smooth vector bundle of rank $k$, there is an open neighbourhood $U \subset B$ of $b_0$ and a smooth local frame consisting of smooth sections $\sigma_i:U \to E$ for $1 \leq i \leq k$, where $\sigma_i(b) \in E_b$ and $(\sigma_1(b),\dots,\sigma_k(b))$ is a basis of $E_b$ for every $b \in U$.
We define smooth sections $e_i:U \to E$ inductively. First set
\begin{align*}
e_1(b):=\frac{\sigma_1(b)}{\sqrt{g_b(\sigma_1(b),\sigma_1(b))}}.
\end{align*}
The function $b \mapsto g_b(\sigma_1(b),\sigma_1(b))$ is smooth and positive on $U$, so $e_1$ is smooth.
Assume $e_1,\dots,e_{m-1}$ have been constructed for some $2 \leq m \leq k$, are smooth, and form a $g_b$-orthonormal list in each fibre $E_b$. Define
\begin{align*}
\widetilde e_m(b)
:=
\sigma_m(b)-\sum_{i=1}^{m-1} g_b(\sigma_m(b),e_i(b))e_i(b).
\end{align*}
Since the operations used are smooth fibrewise addition, scalar multiplication, and the smooth metric $g$, the section $\widetilde e_m:U \to E$ is smooth. For each $b \in U$, the vector $\widetilde e_m(b)$ is nonzero: otherwise $\sigma_m(b)$ would lie in the span of $\sigma_1(b),\dots,\sigma_{m-1}(b)$, contradicting that $(\sigma_1(b),\dots,\sigma_k(b))$ is a basis of $E_b$. Hence the function
\begin{align*}
b \mapsto g_b(\widetilde e_m(b),\widetilde e_m(b))
\end{align*}
is smooth and positive on $U$. Define
\begin{align*}
e_m(b):=\frac{\widetilde e_m(b)}{\sqrt{g_b(\widetilde e_m(b),\widetilde e_m(b))}}.
\end{align*}
Then $e_m$ is smooth, has $g_b$-norm $1$, and is $g_b$-orthogonal to $e_1,\dots,e_{m-1}$ by construction.
By induction, $(e_1(b),\dots,e_k(b))$ is a $g_b$-[orthonormal basis](/page/Orthonormal%20Basis) of $E_b$ for every $b \in U$.
[guided]
The first task is to make the metric visible in coordinates. A vector bundle already gives smooth local frames, but those frames need not respect the inner product. We therefore start with an arbitrary smooth frame consisting of smooth sections $\sigma_i:U \to E$ for $1 \leq i \leq k$, and replace it by an orthonormal one using the fibrewise Gram-Schmidt construction proved below.
For the first vector, define
\begin{align*}
e_1(b):=\frac{\sigma_1(b)}{\sqrt{g_b(\sigma_1(b),\sigma_1(b))}}.
\end{align*}
The denominator is legitimate because $\sigma_1(b)\neq 0$ in every fibre $E_b$, and $g_b$ is an inner product, so $g_b(\sigma_1(b),\sigma_1(b))>0$. The smoothness of the fibrewise metric says precisely that $b \mapsto g_b(\sigma_1(b),\sigma_1(b))$ is smooth; since the square-root function is smooth on $(0,\infty)$, the section $e_1$ is smooth.
Now suppose $e_1,\dots,e_{m-1}$ have already been constructed and are smooth and orthonormal in each fibre. We remove from $\sigma_m$ its components in the directions already chosen:
\begin{align*}
\widetilde e_m(b)
:=
\sigma_m(b)-\sum_{i=1}^{m-1} g_b(\sigma_m(b),e_i(b))e_i(b).
\end{align*}
This is the usual Gram-Schmidt projection formula, applied fibre by fibre. The coefficient $g_b(\sigma_m(b),e_i(b))$ is a smooth real-valued function of $b$, because both sections and the metric are smooth. Therefore $\widetilde e_m:U \to E$ is smooth.
We also need $\widetilde e_m(b)$ never to vanish. If $\widetilde e_m(b)=0$, then
\begin{align*}
\sigma_m(b)=\sum_{i=1}^{m-1} g_b(\sigma_m(b),e_i(b))e_i(b).
\end{align*}
Since each $e_i(b)$ lies in the span of $\sigma_1(b),\dots,\sigma_i(b)$, the right-hand side lies in the span of $\sigma_1(b),\dots,\sigma_{m-1}(b)$. This contradicts the [linear independence](/page/Linear%20Independence) of the local frame at $b$. Hence $\widetilde e_m(b)\neq 0$ for every $b \in U$.
We may therefore normalize:
\begin{align*}
e_m(b):=\frac{\widetilde e_m(b)}{\sqrt{g_b(\widetilde e_m(b),\widetilde e_m(b))}}.
\end{align*}
Again the denominator is a positive smooth function, so $e_m$ is smooth. The projection formula gives $g_b(e_m(b),e_i(b))=0$ for $i<m$, and the normalization gives $g_b(e_m(b),e_m(b))=1$. Induction produces a smooth orthonormal frame $(e_1,\dots,e_k)$ over $U$.
[/guided]
[/step]
[step:Use each orthonormal frame to trivialize the unit sphere bundle]
Define the unit sphere bundle $S(E) \subset E$ by
\begin{align*}
S(E):=\left\{v \in E:g_{\pi(v)}(v,v)=1\right\}.
\end{align*}
Let $\pi_S:S(E) \to B$ denote the restriction of the vector bundle projection $\pi:E \to B$ to $S(E)$, so $\pi_S(v)=\pi(v)$ for every $v \in S(E)$.
For an [open set](/page/Open%20Set) $U \subset B$ with smooth orthonormal frame $(e_1,\dots,e_k)$, define the map $\Phi_U: U \times S^{k-1} \to \pi_S^{-1}(U)$ by
\begin{align*}
\Phi_U\left(b,(a_1,\dots,a_k)\right)
=
\sum_{i=1}^{k} a_i e_i(b).
\end{align*}
Here $S^{k-1}$ denotes the standard sphere in $\mathbb{R}^k$, defined by
\begin{align*}
S^{k-1}:=\left\{a=(a_1,\dots,a_k)\in \mathbb{R}^k:\sum_{i=1}^{k}a_i^2=1\right\}.
\end{align*}
For $a \in S^{k-1}$, orthonormality gives
\begin{align*}
g_b\left(\sum_{i=1}^{k} a_i e_i(b),\sum_{j=1}^{k} a_j e_j(b)\right)
=
\sum_{i=1}^{k} a_i^2
=
1,
\end{align*}
so $\Phi_U$ indeed maps into $\pi_S^{-1}(U)$.
Define the map $\Psi_U:\pi_S^{-1}(U) \to U \times S^{k-1}$ by
\begin{align*}
\Psi_U(v)
=
\left(\pi(v),\left(g_{\pi(v)}(v,e_1(\pi(v))),\dots,g_{\pi(v)}(v,e_k(\pi(v)))\right)\right).
\end{align*}
If $v \in S(E)$ and $b=\pi(v)$, then the orthonormal basis expansion in $E_b$ gives
\begin{align*}
v=\sum_{i=1}^{k} g_b(v,e_i(b))e_i(b),
\end{align*}
and the coefficient vector belongs to $S^{k-1}$ because $g_b(v,v)=1$. Therefore $\Psi_U$ is well-defined. The maps $\Phi_U$ and $\Psi_U$ are inverse to each other by the uniqueness of coordinates in the orthonormal basis $(e_1(b),\dots,e_k(b))$.
The orthonormal-frame vector bundle trivialization $\Theta_U:E|_U \to U \times \mathbb{R}^k$ is the smooth map
\begin{align*}
\Theta_U(v)
=
\left(\pi(v),\left(g_{\pi(v)}(v,e_1(\pi(v))),\dots,g_{\pi(v)}(v,e_k(\pi(v)))\right)\right).
\end{align*}
Its inverse is the smooth map sending $(b,(a_1,\dots,a_k))$ to $\sum_{i=1}^k a_i e_i(b)$. If $v \in E_b$ has coordinates $a_i=g_b(v,e_i(b))$ in the orthonormal basis $(e_1(b),\dots,e_k(b))$, then
\begin{align*}
g_b(v,v)=\sum_{i=1}^{k}a_i^2.
\end{align*}
Thus $\Theta_U$ restricts exactly to a smooth identification of $S(E)|_U$ with the embedded submanifold $U \times S^{k-1}$ of $U \times \mathbb{R}^k$, because the fibrewise norm becomes the standard Euclidean norm in these coordinates. With this restricted smooth structure, both maps are smooth: $\Phi_U$ is built from smooth sections, smooth scalar multiplication, and smooth fibrewise addition, while $\Psi_U$ is built from $\pi$, the smooth sections $e_i$, and the smooth metric $g$. Hence $\Phi_U$ is a smooth local trivialization of $\pi_S:S(E)\to B$ over $U$ with fibre $S^{k-1}$.
[/step]
[step:Show that overlap maps are smooth and orthogonal]
Let $U,V \subset B$ be two open sets with smooth orthonormal frames $(e_1,\dots,e_k)$ over $U$ and $(f_1,\dots,f_k)$ over $V$. On $U \cap V$, define the matrix-valued map $A_{VU}:U \cap V \to GL(k,\mathbb{R})$ by the coordinate relation
\begin{align*}
e_i(b)=\sum_{j=1}^{k}\left(A_{VU}(b)\right)_{ji} f_j(b).
\end{align*}
Taking the $g_b$-inner product with $f_\ell(b)$ gives
\begin{align*}
\left(A_{VU}(b)\right)_{\ell i}=g_b(e_i(b),f_\ell(b)).
\end{align*}
Thus every matrix entry is a smooth function on $U \cap V$, so $A_{VU}$ is smooth.
Let $\delta_{im}$ denote the Kronecker delta, so $\delta_{im}=1$ when $i=m$ and $\delta_{im}=0$ when $i\neq m$. For every $b \in U \cap V$, both frames are $g_b$-orthonormal. Hence, for $1 \leq i,m \leq k$,
\begin{align*}
\delta_{im}
=
g_b(e_i(b),e_m(b))
=
g_b\left(\sum_{j=1}^{k}\left(A_{VU}(b)\right)_{ji}f_j(b),
\sum_{\ell=1}^{k}\left(A_{VU}(b)\right)_{\ell m}f_\ell(b)\right)
=
\sum_{j=1}^{k}\left(A_{VU}(b)\right)_{ji}\left(A_{VU}(b)\right)_{jm}.
\end{align*}
This says
\begin{align*}
A_{VU}(b)^\top A_{VU}(b)=I_k.
\end{align*}
Therefore $A_{VU}(b)\in O(k)$ for every $b \in U \cap V$, where $O(k)$ is the orthogonal group of linear isometries of $\mathbb{R}^k$ for the standard Euclidean inner product. Hence
\begin{align*}
A_{VU}:U \cap V \to O(k)
\end{align*}
is a smooth transition function.
[/step]
[step:Identify the sphere bundle transition functions with the orthogonal restrictions]
Let $\Phi_U:U \times S^{k-1}\to \pi_S^{-1}(U)$ and $\Phi_V:V \times S^{k-1}\to \pi_S^{-1}(V)$ be the local trivializations constructed from the orthonormal frames over $U$ and $V$. For $b \in U \cap V$ and $a=(a_1,\dots,a_k)\in S^{k-1}$, compute
\begin{align*}
\Phi_U(b,a)
=
\sum_{i=1}^{k}a_i e_i(b)
=
\sum_{i=1}^{k}a_i\sum_{j=1}^{k}\left(A_{VU}(b)\right)_{ji}f_j(b)
=
\sum_{j=1}^{k}\left(A_{VU}(b)a\right)_j f_j(b).
\end{align*}
Applying $\Phi_V^{-1}$ gives
\begin{align*}
(\Phi_V^{-1}\circ \Phi_U)(b,a)
=
(b,A_{VU}(b)a).
\end{align*}
Since $A_{VU}(b)\in O(k)$, the map $a \mapsto A_{VU}(b)a$ preserves $S^{k-1}$. Since $A_{VU}:U\cap V\to O(k)$ is smooth and the standard action $O(k)\times S^{k-1} \to S^{k-1}$, $(A,a) \mapsto Aa$, is smooth, the overlap map $\Phi_V^{-1}\circ \Phi_U$ is smooth.
Thus the local trivializations of $\pi_S:S(E)\to B$ have transition functions valued in $O(k)$.
[/step]
[step:Conclude that the unit sphere bundle is a smooth fibre bundle]
The open sets $U$ constructed above cover $B$, because every point of $B$ has a vector bundle trivialization and hence a local frame. On each such open set, $\pi_S^{-1}(U)$ is smoothly identified with $U \times S^{k-1}$ by $\Phi_U$, and on overlaps the transition functions are smooth maps into $O(k)$ acting on $S^{k-1}$.
Therefore $\pi_S:S(E)\to B$ is a smooth fibre bundle with typical fibre $S^{k-1}$ and structure group reducible to $O(k)$. This proves the theorem.
[/step]