Let $V$ be a (complex, finite-dimensional) vector space. Suppose that two (finite) groups $A$ and $B$ act on $V$. Furthermore, suppose that these actions commute, so that the direct product $A \times B$ also acts on $V$.
As a representation of $A$, we can decompose $V$ as the direct sum $$ V = \bigoplus_i V_i ,$$ where each $V_i$ is an irreducible representation. And we can do the same by considering $V$ as a representation of $B$, say
$$V = \bigoplus_j V_j' .$$
Also, it is known that every irreducible representation of a direct product of groups $A \times B$ is of the form $V_i \otimes V_j'$, where $V_i$ is irreducible for $A$ and $V_j'$ is irreducible for $B$.
My question is : If I know the two decompositions of $V$ as both a representation of $A$ and of $B$, can I understand its decomposition $$ V = \bigoplus_{i,j} V_i \otimes V_j' $$ into irreducible representations of $A \times B$ in a simple way, or is it a hard problem in general?