TITLE: In how many ways can $7$ people be chosen out of $12$ people so that $2$ given people can never be selected together?
QUESTION [6 upvotes]: Is it right to take the combination of $7$ out of $12$ and subtract the combination of $5$ out of $10$ so i take out the ways that both of them are chosen?
So it will be $792-252=540$
I just find the number way too small.

REPLY [2 votes]: You are not quite right, but you can use your idea.
You have $\binom{12}{7}$, which are all combinations of $7$ out of $12$ people, disregarding that person $A$ and $B$ must not be together.
You want to leave out the choices, where $A$ and $B$ are together, so you assume you choose both $A$ and $B$, leaving $5$ choices among $10$, which is why you subtract $\binom{10}{5}$.
But you forgot that you could also not have chosen both $A$ and $B$, so that both of these people end up in the group that wasn't chosen. But if you fix $A$ and $B$ in the group that was not chosen, then you are left with choosing $7$ people out of $10$, i.e. $\binom{10}{7}$.
In total, you get $\binom{12}{7}-\binom{10}{5}-\binom{10}{7} = 420.$
Edit: As per the comments, the answer to the intended question is $\binom{12}{7}-\binom{10}{5}$, as in the original post.