Problem: At Lexington High School, each student studies at least one language—Spanish, French, or Latin —and no student studies all three languages. If 100 students study Spanish, 80 study French, 40 study Latin, and 22 study exactly two languages, how many students are there at Lexington High School?
We have the Inclusion/Exclusion formula
$$|F\cup L\cup S|=|F|+|L|+|S|-|F\cap L|-|L\cap S|-|S\cap F|+|F\cap L\cap S|.$$
The textbook says that
Total Number of People Equals Group 1 + Group 2 + Group 3 - # of people in two groups - 2*(# of people in all three groups) + (# of people in no groups).
This is a contradiction to the inclusion-exclusion formula . How did they arrive at twice the number of people in all three groups?
The inclusion-exclusion formula also says add the three-way intersection rather than subtract that quantity twice.
They subtract twice the number of people in all three groups because, say, Betty is studying Latin, Spanish, and French, then she's been counted three times in the groups. It looks like they should have said "subtract the number of people in exactly two groups" there rather than "subtract the number of people in two groups" since that is ambiguous between people in two or more or people in exactly two. However, for the book to be correct, it has to be exactly two groups.
In this terminology, what the book seems to mean by "the number of students studying two classes" is not $|F\cap L|+|L\cap S|+|S\cap F|$, but $|F\cap L \cap S^c|+|L\cap S\cap F^c|+|S\cap F \cap L^c|$, where $S^c$ means the complement of $S$, students who are not studying Spanish, so the intersection of all three is excluded.
The reason to add these students back once is because when we subtract terms like $|F\cap S|$, we subtract this intersection one time too many, it gets subtracted three times.
In summary:
$\def\abs#1{\lvert #1\rvert}\small\begin{align} &\quad \abs{F\cap S}+\abs{F\cap L}+\abs{L\cap S}\\&=\abs{F\cap S\cap L}+\abs{F\cap L^c\cap S}+\abs{F\cap L}+\abs{L\cap S}\\&=3\abs{F\cap S\cap L}+\underbrace{\abs{F\cap L^c\cap S}+\abs{F\cap L\cap S^c}+\abs{F^c\cap L\cap S}}_{\#\text{ of people in }\textit{exactly}\text{ two groups}}\\[2ex]&\quad\abs{F\cup S\cup L}+\abs{(F\cup S\cup L)^c} \\& = \abs F+\abs L+\abs S-\abs{F\cap S}-\abs{F\cap L}-\abs{L\cap S}+\abs{F\cap S\cap L}+\abs{(F\cup S\cup L)^c}\\&=\abs F+\abs L+\abs S-\abs{F\cap L\cap S^c}-\abs{F\cap L\cap S^c}-\abs{F^c\cap L\cap S}-2\abs{F\cap L\cap S}+\abs{(F\cup S\cup L)^c}\end{align}$
And of course the number of people taking no language, $\abs{(F\cup S\cup L)^c}$ equals $0$.