Step 1: Use the formula for mean free path.
Mean free path for a gas:
$\lambda \propto \dfrac{1}{n}$, where $n$ is number density.
Since both boxes contain equal number of molecules,
$n_A = \dfrac{N}{V_A},\; n_B = \dfrac{N}{V_B}$.
Step 2: Relate the mean free paths.
$\lambda_A \propto \dfrac{V_A}{N}, \lambda_B \propto \dfrac{V_B}{N}$.
Thus $\lambda_A \propto V_A,\; \lambda_B \propto V_B$.
Step 3: Compare with molecular spacing.
Mean molecular separation $\propto V^{1/3}$.
Hence the ratio $\lambda / V^{1/3}$ is constant for equal number of molecules.
Step 4: Conclusion.
Therefore, $\dfrac{\lambda_A}{V_A^{1/3}} = \dfrac{\lambda_B}{V_B^{1/3}}$.
