I'm trying to prove the following statement:
Let $\xi = \left(\pi, E, M \right)$ be a vector bundle of rank $r$ with connection $\nabla$. Let $U \subset M$ be a trivializing open set and $\{ s_1, \dots , s_k \}$ and $\{ s_1' , \dots , s_k' \}$ be two basis of local sections for $\xi$. Denoting by $A = \left[a^i_j\right] \in C^\infty\left(U, GL(r) \right)$ the matrix of change of basis so that $s'_i = \sum_j a_i^j s_j$. Denoting by $\Omega, \Omega'$ the curvature 2-forms, they are related by $$ \Omega' = A^{-1} \Omega A\,.$$ Using this and that $$\omega' = A^{-1} \omega A + A^{-1} dA\,, $$ where $\omega$ is the curvature 1-form, show that if $\nabla$ is a flat connection then around any point $p$ one can find a local basis of flat connections.
Moreover, a hint is given: use the condition $\omega'=0$ to define an integrable distribution in $U \times GL(r)$ and apply Frobenius.
What I thought was that since the connection is flat, then $\Omega' = \Omega= 0$. However, $\Omega = d \omega + \omega \wedge \omega \implies d \omega = - \omega \wedge \omega$ (and the same expression holds for $\omega'$). This tells us that $\omega'$ is a differential ideal and the distribution defined by $D= \mathrm{span} \{ X \in \mathfrak{X}(U) : \omega'(X) = 0 \}$ is involutive and therefore by Frobenius is integrable, but this doesn't seem to get me anywhere...
Overall, I think I'm missing something that should be obvious since my distribution is not even in $U\times GL(r)$, however, I'm at a loss on what such a distribution would be, so any pointers on how to proceed would be greatly appreciated.
HINT: Start with a basis $\{s_1,\dots,s_r\}$ of sections on $U$. You want to define new sections $s_i' = \sum a_i^j s_j$ so that the connection form $\omega'$ with respect to the new basis $\{s_i'\}$ vanishes on $U$. This is now a differential system on $U\times GL(k)$ whose integral manifolds will give you the possible graphs of $A=(a_i^j)$ as functions of $x\in U$. (This approach is typically credited to E. Cartan, not too surprisingly.)