The number of ways in which distinct objects can be put into two different boxes so that no box remains empty, is
Each object can be put either in box (say) or in
box (say). So, there are two choices for each of then objects.
Therefore, the number of choices for distinct objects is
These choices correspond to either the first or the second box
being empty. Thus, there are ways in which neither box is empty.