Let $x\in M$, consider $y\in p^{-1}(x)$, we denote by $h_y:G\rightarrow \bar M$ defined by $h(g)=g(y)$, and by $V_y=\{dh_{Id_G}(u),u\in T_{Id_G}G\}$. Let $U_y$ be the subspace of $T_y\bar M$ orthogonal to $V_y$. Since $p$ is a submersion, for every $u\in T_xM$ there exists $v\in T_y\bar M$ such that $dp_y(v)=u$.
Write $v=v_1+v_2, v_1\in V_y, v_2\in U_y$, since $p\circ l=p$ for every $l\in G$, we deduce that $p\circ h_y=x$ and $dp_y(v_1)=0$. This implies that $u=dp_y(v_2)$, remark that there exists a unique $v_2$ in $U_y$ such that $dp_y(v_2)=u$. To see this, suppose that $dp_y(v_2)=dp_y(v'_2), v_2,v'_2\in U_y$, $dp_y(v_2-v_2')=0$ implies that $v_2-v_2'$ tangent to $h_y(G)$, since $V_y\cap U_y=0$, we deduce that $v_2=v'_2$.
Consider $u,u'\in T_xM, v.v'\in U_y: dp_y(v)=u, dp_y(v')=v$, write $g_x(u,u')=\bar g_y(v,v')$. This definition does not depends of $v,v'\in U_y$ since they are unique. Suppose that $p(z)=x, w,w'\in U_z$ such that $dp_z(w)=u, dp_z(w')=u'$. Since $G$ acts transitively on $G_y$, there exists $l\in G$ such that $l(y)=z$, we have $p\circ l=p$ this implies that $dp_y(u)= dp_z(dl_y(u))$. For every $a\in V_y, g_y(a,u)=0$ implies that $g_z(dl_y(a),dl_y(u))=0$, since $dl_y(a)\in V_z$ and $l$ is invertible we deduce that for every $b\in V_z, \exists a\in V_y$ such that $dl_y(a)=b$. This implies that $dl_z(u)$ is orthogonal to $V_z$ and $dl_z(u)\in U_z$. Similarly we show that $dl_y(u)\in U_z$. so the definition does not depend of $y$.