It's a simple permutation problem.
Suppose there are $N$ distinguishable particles. Let $n_L$ be the number of particles distributed in the left & $n_R$ distributed at the right compartment.
First of all, you are to select a particle for the first place of $N$ places. How many ways can it be done? It can be done in $N$ ways; now the second place can be filled by $(N-1)$ ways. Similarly, by extrapolation, we can find the number of ways the $N^\text{th}$ place can be filled is $(N-(N-1))$ ways. By rule of multiplication, all these can be done simultaneously in $N!$ ways.
Now, suppose you've $n_L$ distinguishable particles ; then they can be arranged in $n_L$ places by $n_L!$ ways; similarly $n_R$ particles can be arranged among $n_R$ places by $n_R!$ ways.
But all we know that $N$ particles are indistinguishable. Let the total number of arrangements be $x$. For each arrangement, we could arrange $n_L$ particles & $n_R$ particles among them by $n_L!$ & $n_R!$ ways if they were distinguishable. So, total number of arrangements is $x\cdot n_L!\cdot n_R!$ ways. But this is equal to $N!$ ways, So, by equating them, we get the number of ways the indistinguishable particles can be arranged i.e. $x$ viz.$$x= \frac{N!}{n_L!\cdot n_R!}.$$