$\mathbf {The \ Problem \ is}:$ Let, $P,Q,R$ be smooth real-valued maps on $M=\mathbb R^{3}$ with $P^{2}+Q^{2}+R^{2} \neq 0.$ Let, $E(a)$ denote the orthogonal complement of the subspace $S$ in $T_a(M)$ spanned by the smooth vector field $(PD_x + QD_y +RD_z)(a).$
Show $E$ is a smooth distribution in $M$ and is integrable iff $P(D_zQ -D_yR) + Q(D_xR -D_zP) + R(D_yP -D_xQ)=0$
$\mathbf {My \ approach}:$ Here, $E$ is a rank-$2$ distribution and let $V_1(a) = \sum_{i=1}^3 {V_1}^i(a) D_{e_i}|_{a}$ and $V_2(a)= \sum_{j=1}^3 {V_2}^j(a) D_{e_j}|_{a}$ are bases of $S.$
So, $P{V_1}^1 + Q{V_1}^2 +R{V_1}^3 =0.$ $P{V_2}^1 + Q{V_2}^2 +R{V_2}^3 =0.$
Then, I think ${V_1}^i$ and ${V_2}^j$ will be smooth (also we can create basis of $S$ like $(Q,-P,0)$ and $(0,R,-Q)$ , so $E$ is smooth) .
Now, by Frobenius' theorem, involutive $<=>$ integrable .
Applying the formula of $[V_1,V_2]$ (Lee, Smooth manifolds Proposition 8.26, pg 186) , I can't properly bring the expression in the question .
A small hint is warmly appreciated, thanks in advance .