If there exists a global section then the principal bundle is trivial - problem with smoothness
Let $\pi \colon P \to B$ be a principal $G$-bundle and let $s \colon B \to P$ be it's smooth section. In order to show that $P \simeq B \times G$ I define the map $\varphi \colon P \to B \times G$ by the following rule: $$ \varphi(p) = (\pi(p),g(p)) $$ where $g(p) \in G$ is such that $p = s(\pi(p))g(p)$ (it always exists since the right action of $G$ is transitive on each fiber and it is unique since the action is free on each fiber). It is clear that $\varphi(ph) = (\pi(p),g(p)h)$ and that $\pi = \pi_1 \circ \varphi$. Also one can see that $\varphi$ is a bijection. The only problem for me to finish the demonstration is to show that $\varphi$ is smooth. Please, help me with this.
Added: a principal $G$-bundle is given by two smooth manifolds $P$ and $B$ and by a Lie group $G$ together with a smooth submersion $\pi \colon P \to B$ and with a free smooth right action of $G$ on $P$ such that $B \simeq P/G$ as sets and for any $b \in B$ there exists a neighborhood $U$ of $b$ and a diffeomorphism $\varphi \colon \pi^{-1}(U) \to U \times G$, such that $\pi = \pi_1 \circ \varphi$ and $\pi_2 \circ \varphi$ is $G$-equivariant.
It is simpler to prove smoothness of the inverse map $$G\times B\to P,\quad(g,b)\mapsto s(b)\cdot g$$ The smoothness of the section and of the $G$-action on $P$ imply smoothness, and deduce smoothness of the map you are looking at from the inverse function theorem.
One can also show, using the inverse function theorem, that the canonical map $$P\times_B P\to G, (p,q)\mapsto g$$ (where $q=p\cdot g$) is smooth (using the inverse function theorem) and deduce the result you are interested in from there.