I think this question is asking for the number of sub-multisets of the multiset $$\\{\overbrace{x,x,\ldots,x}^{p \text{ copies}}\\} \cup \\{\overbrace{y,y,\ldots,y}^{q \text{ copies}}\\} \cup \\{1,\ldots,r\\}.$$
To construct a sub-multiset:
* we choose anywhere from $0$ to $p$ copies of $x$,
* we choose anywhere from $0$ to $q$ copies of $y$, and
* we choose a subset of $\\{1,\ldots,r\\}$.
These are combined (multiset union) to give a sub-multiset of the original set.
Thus there's $p+1$ choices for the number of $x$'s, for each of which there are $q+1$ choices for the number of $y$'s, and for each of which there are $2^i$ choices for the subset of $\\{1,\ldots,r\\}$. Thus giving $$(p+1)(q+1)2^r$$ sub-multisets (or "combinations").