Let $V$ be a finite-dimensional vector space over a field $K$. Consider the group $GL(V)$ of non-singular linear maps acting on pairs of subspaces $(U,W)$ of fixed dimensions $p$, $q$ respectively by $g(U,W)=(gU,gW)$. Prove that two pairs $(U,W)$ and $(U',W')$ are in the same $GL(V)$-orbit (i.e., there exists $g\in GL(V)$ such that $gU=U'$ and $gW=W'$) $\Leftrightarrow \dim(U\cap W)=\dim (U'\cap W')$.
This came up on a qualifying exam, and frankly, and I don't even know where to begin in order to relate the dimension to orbits. I thought maybe an appeal to the index of the space might help, but that was fruitless. Any suggestions?