Show that $\pi \circ \phi=p_1$ (Vector bundles)?

Let $\pi\colon E\to M$ be a vector bundle and $s_1,...,s_n\colon E\to M$ be sections such that for each $x\in M$ the set $\big\{s_1(x),...,s_n(x)\big\}$ is a linearly independent subset of $\Bbb R$-vector space $\pi^{-1}(x)$. We need to show, $\pi$ is isomorphic to trivial bundle, i.e., there is a smooth map $\phi\colon M\times \Bbb R^n \to E$ with $\pi\circ \phi=\text{id}_M\circ p_1$ such that the restriction $\phi\big|p_1^{-1}(x)\to \pi^{-1}(x)$ is a $\Bbb R$-linear isomorphism for each $x\in M$, where $p_1\colon M\times \Bbb R^n\to M$ is the projection vector bundle. $\require{AMScd}$ \begin{CD} M\times \Bbb R^n @>\displaystyle\phi>> E\\ @Vp_1 V V @VV \pi V\\ M @>>\displaystyle \text{id}_M> M\\ \end{CD}


$(1)$ Definition says that for a section $s\colon M\to E$ we have $\pi\circ s=\text{Id}_{M}$. In particular, $s(x)\in \pi^{-1}(x)$ for each $x\in M$.

$(2)$ Also, note that definition of vector bundle says that (actually restriction of bundle chart on each fiber gives) there is a $\Bbb R$-linear isomorphism $f_x\colon\pi^{-1}(x)\to \{x\}\times \Bbb R^n\cong \Bbb R^n$, where $x\in M$. In particular, $\pi\circ f_x^{-1}(x,\mathbf c)=x$ for all $x\in M, \mathbf c\in \Bbb R^n$.


Write $f_x\big(s_i(x)\big)=(x,\mathbf c_i)$ for some $\mathbf c_i\in \Bbb R^n$ where $i=1,...,n$. Define $\phi\colon M\times \Bbb R^n\to E$ as $$\phi\big(x,(y_1,...,y_n)\big)=\displaystyle \sum_{i=1}^n y_i\cdot s_i(x)$$ where $x\in M$ and $y_1,...,y_n\in \Bbb R$. It is easy to check that $\phi$ is a smooth map (as each $s_i$ is smooth) and the fiberwise restriction of $\phi$ is an linear isomorphism. So, we need only to check that $\pi\circ \phi=\text{id}_M\circ p_1=p_1$. Now, $$\pi\circ \phi\big(x,(y_1,...,y_n)\big)=\pi\left(\sum_{i=1}^ny_i\cdot s_i(x)\right)=\pi\left(\sum_{i=1}^ny_i\cdot f_x^{-1}(x,\mathbf c_i)\right)$$$$=\pi\left( f_x^{-1}\left(x,\sum_{i=1}^ny_i\cdot\mathbf c_i\right)\right)\big[\text{as the inverse of the }\Bbb R\text{-linear map }f_x\text{ is also }\Bbb R\text{-linear}\big]$$$$=\pi\circ f_x^{-1}\left( x,\sum_{i=1}^ny_i\cdot\mathbf c_i\right)=x=p_1\big(x,(y_1,...,y_n)\big).$$