I have been doing inclusion exclusion questions and while, for the most part, I can see what I am doing in each step and which subsets I am adding/removing, the following type of question I can't seem to see exactly what is happening. I know how to do them, but I am just following a pattern that I have seen from doing a number of them - I can't visualise which subsets I am adding/removing as I do them. I was wondering if someone could tell me what's happening exactly as I do this problem:

Find the number of solutions for the equation $\displaystyle x_1 + x_2 + ... + x_9 = 24$, where $\displaystyle 4\leq x_1,x_2<9$

So, when $\displaystyle x_1$ and $\displaystyle x_2$ are 4 or greater, then the total number of solutions will be:

$\displaystyle {9+24-8-1\choose 9-1} = {24\choose 8}$

I can see what is going on here, every set that includes a value for $\displaystyle x_1$ and $\displaystyle x_2$ less than 4 is excluded. The next steps I do, I get a bit confused what is happening and why...

Suppose: $\displaystyle x_1$ OR $\displaystyle x_2$ < 9 - 4 = 5

Then: $\displaystyle x_1 + x_2 + ... + x_9 = 16 - 5 = 11$

There are two choices so, there are $\displaystyle 2\times {19\choose 8}$ ways this can happen.

Subtract this from the total: $\displaystyle {24\choose 8} - 2\times {19\choose 8}$

Finally I need to add the instance when both $\displaystyle x_1$ and $\displaystyle x_2$ are < 5 to give the final answer:

$\displaystyle {24\choose 8} - 2\times {19\choose 8}+{14\choose 8}$

I can do these questions, it's just I am doing them without knowing what's going on exactly. So, if the question format was changed up a bit, I might struggle. What has been counted/over-counted at what stage etc.?

Thanks.