If $A$ has cardinal $j \in \lbrace 0, ..., n \rbrace$, the number of $B$ such that $A \cap B = \emptyset$ is equal to the number of subsets of a set of cardinal $n-j$, i.e. is equal to $2^{n-j}$.
And you have ${n \choose j}$ subsets of cardinal $j$, so the number of pairs $(A,B)$ such that $A \cap B = \emptyset$ is equal to $$\sum_{j=0}^n {n \choose j} 2^{n-j} = 3^n$$
**Another way to see this result :** for each element of $\lbrace 1, ..., n \rbrace$, you have $3$ choices : put it in $A$, put it in $B$, or put it in $\lbrace 1, ..., n \rbrace \setminus (A \cup B)$. Because you want $A \cap B = \emptyset$, these choices are disjoint. So the total number of choices is $$3^n$$