Simultaneous Frobenius on two distributions Suppose I have two smooth distributions $\mathcal{A},\mathcal{B}$ (on a manifold $M^m$) which are complementary, meaning that $$TM=\mathcal{A}\oplus\mathcal{B},$$
and involutive, meaning that
$$[\mathcal{A},\mathcal{A}]\subseteq\mathcal{A},\quad[\mathcal{B},\mathcal{B}]\subseteq\mathcal{B}. $$
Is it always possible to find locally $m$ linearly independent vector fields $X_1,\dots,X_m$ such that
$$ \mathcal{A}=\langle X_1,\dots,X_k\rangle,\quad \mathcal{B}=\langle X_{k+1},\dots,X_m\rangle,\quad [X_i,X_j]=0 $$
for all $i,j=1,\dots,m$? Of course, here $k$ is the rank of $\mathcal{A}$ and $m-k$ is the rank of $\mathcal{B}$.
Are there necessary/sufficient conditions? One cannot impose the condition $[\mathcal{A},\mathcal{B}]=0$ since it is too strong (it is not even satisfied if $M=\mathbb{R}^m$ and $\mathcal{A}=\langle e_1,\dots,e_k\rangle,\mathcal{B}=\langle e_{k+1},\dots,e_m\rangle$).
 A: The answer seems to be yes: for any $p\in M$, by the local Frobenius theorem (as stated, e.g., in this paper) there exist a coordinate system $(x^1,\dots,x^m)$ around $p$ such that
$$ \mathcal{A}=\left\langle\frac{\partial}{\partial x^1},\dots,\frac{\partial}{\partial x^k}\right\rangle. $$
In particular, on the domain of this coordinate chart we have $$\mathcal{A}=\bigcap_{j=k+1}^m\text{ker}(dx^j).$$
The same can be done for $\mathcal{B}$ with a coordinate system $(y^1,\dots,y^m)$:
$$ \mathcal{B}=\left\langle\frac{\partial}{\partial y^{k+1}},\dots,\frac{\partial}{\partial x^m}\right\rangle,\quad \mathcal{B}=\bigcap_{j=1}^k\text{ker}(dy^j). $$
Now $(y^1,\dots,y^k,x^{k+1},\dots,x^m)$ is a coordinate system near $p$: indeed, it suffices to show that $dy^1,\dots,dy^k,dx^{k+1},\dots,dx^m$ are linearly independent at $p$, which follows from
$$ \text{ker}(dy^1)\cap\cdots\cap\text{ker}(dy^k)\cap\text{ker}(dx^{k+1})\cap\cdots\cap\text{ker}(dx^m)=\mathcal{B}\cap\mathcal{A}=\{0\}. $$
Thus, defining $X_i:=\frac{\partial}{\partial y^i}$ for $i=1,\dots,k$ and $X_i:=\frac{\partial}{\partial x^i}$ for $i=k+1,\dots,m$ (with respect to the new coordinate system!), we obviously have $[X_i,X_j]=0$. Moreover, for any $i=1,\dots,k$,
$$ X_i\in\bigcap_{j=k+1}^m\text{ker}(dx^j)=\mathcal{A} $$
and so (by dimension considerations) $X_1,\dots,X_k$ forms a basis of $\mathcal{A}$. Similarly for $\mathcal{B}$.
