A morphism of principal $G$ bundles over the base space $B$ is an isomorphism. Let $p_1:E_1\to B$ and  $p_2:E_2\to B$ be two principal $G$-bundles.
Let $f:E_1\to E_2$ be a principal $G$-bundle morphism. I want to show that $f$ is an isomorphism. I read somewhere that it is enough to show that it is bijective on the fibers. Let $x\in B$ and consider the restriction $f:p_1^{-1}(x)\to  p_2^{-1}(x)$ the map is well defined since $p_2\circ f=p_1$. I want to show that this restriction is bijective.
injectivity: 
Suppose $f(e_1)=f(e_1')$. Since the action of $G$ is transitive on the fibers, there exists $g\in G$ such that $e_1'=ge_1$ hence $f(e_1)=f(ge_1)$ but the map $f$ is by definition $G$-equivariant so $f(ge_1)=gf(e_1)$ now the action is being free then $g=1$ hence $e_1=e_1'$.
As for surjectivity I think it follwos from transitivity of the action but I can't see how to prove it. And finally I want to know how to go from bijection on the fibers $p_1^{-1}(x)\to  p_2^{-1}(x)$ to the bijection on the hole spaces $E_1\to E_2$. Thank you for your help!
 A: Let $y \in p_2^{-1}(x)$, we want to find some $y' \in p_1^{-1}(x)$ such that $f(y') = y$. Let $z \in p_1^{-1}(x)$ be any element*, then $f(z) \in p_2^{-1}(x)$; since $G$ acts transitively on fibers, there exists $g \in G$ such that $g \cdot f(z) = y$. But $g \cdot f(z) = f(g \cdot z) = y$, so we can just set $y' = g \cdot z$.
So now we know that $f$ is a ($G$-equivariant) bijection on each fiber. To construct an inverse of $f$, let $y \in E_2$, $p_2(y) = x$; then $f_x : p_1^{-1}(x) \to p_2^{-1}(x)$ is a bijection, so set $g(y) = f_x^{-1}(y)$. This gives a map $g : E_2 \to E_1$, and it is clear by definition that $g$ is an inverse of $f$. The question is whether $g$ is a bundle map.
Since $f$ is $G$-equivariant, it's easy to see that $g$ is too: $f(h \cdot y) = h \cdot f(y) \implies h \cdot y = g(h \cdot f(y))$ (and $f$ is surjective). It also satisfies $p_1 \circ g = p_2$ (because $p_2 \circ f = p_1$). It remains to show that it is continuous. Let $V \subset E_1$ be an open set; WLOG $p_1(V) = U$ is a trivializing open set (you should check that $p_1$ is an open map, it's an insightful exercise; basically, the standard projection $U \times G \to U$ is open), so that $V \cong U \times G$. But then by definition of $G$, $g^{-1}(V) = p_2^{-1}(U) \cong U \times G$ too, which is open, so $g$ is continuous.

I am assuming the projection maps of the principal bundles are surjective. In general the result is not true otherwise: $\emptyset \to B$ is a principal $G$-bundle, and there is a morphism $\emptyset \to E$ for any other principal bundle, but it need not be an isomorphism...
