Let $X$ be a set of $5$ elements. Find the number of ordered pairs $(A,B)$ of subsets of $X$ such that $A, B\neq \emptyset$ and $A\cap B=\emptyset$ I know this question involves use of combinatorics, but all the solutions I have seen just give the equation without explaining it. Can I get an explanation, because I know the answer and I know the method, I just don’t know how to apply.

If $|A| = k>0$ then you have ${5\choose k}$ possibilities for $A$ and $2^{5-k}-1$ possibilities for $B$ since $B\subseteq X\setminus A$ and $B\ne \emptyset$. So you have to sum (use binomial theorem): \begin{align}\sum _{k=1}^5{5\choose k}(2^{5-k}-1) &= \color{red}{\sum _{k=1}^5{5\choose k}2^{5-k}} 
-\color{blue}{\sum _{k=1}^5{5\choose k}}\\ 
&=\color{red}{(2+1)^5-2^5} -\color{blue}{(1+1)^5+1} \\&= 3^5-2^6+1\\ &= 243-64+1 =180 \end{align}
