I'm having trouble understanding how this form of the principle (on wiki) results in the form below.
My confusion is the last $(-1)^{n-1} |A_1 \cap \cdots \cap A_n|$. Where does this last form appear in the three set example?
Also, if using two sets vs three, is the $\sum_{1 \le i \lt j \lt k \le n}$ unsatisfiable because there are no three $i, j, k$ terms to satisfy it? In that case this summation term disappears?


Rename $A,B$, and $C$ as $A_1,A_2$, and $A_3$, respectively. Then
$$\sum_{i=1}^n|A_i|=|A_1|+|A_2|+|A_3|\,,$$
$$\sum_{i\le i<j\le n}|A_i\cap A_j|=|A_1\cap A_2|+|A_1\cap A_3|+|A_2\cap A_3|\,,$$
and
$$\begin{align*} (-1)^{n-1}|A_1\cap\ldots\cap A_n|&=(-1)^{3-1}|A_1\cap A_2\cap A_3|\\ &=|A_1\cap A_2\cap A_3|\,. \end{align*}$$
The general form is written for more than $3$ sets; it should be understood as
$$\left|\bigcup_{i=1}^nA_i\right|=\sum_{\varnothing\ne I\subseteq[n]}(-1)^{i+1}\left|\bigcap_{i\in I}A_i\right|\,,$$
where $[n]=\{1,2,\ldots,n\}$.