Finding probability of books I'm trying to find the probability of books in certain situations.
Suppose you have $40$ different books ($20$ math books, $15$ history books, and $5$ geography books).
a) You pick two books at random, one at a time. What is the probability that the two books are from different disciplines?
I think I was able to get the answer for the first part:
$$1-\frac{20⋅19+15⋅14+5⋅4}{40⋅39}.$$
b) You pick $5$ books at random, with replacement, one at a time. What is the probability that you’ve picked books from at most two disciplines?
I am not sure to find the probability for this. How to set it up?

for b) the probability is $P=\sum_{k+l+m=5, k\ge 1, l\ge 1, m \ge 1} \frac{5!}{k!l!m!}\left(\frac{20}{40}\right)^k\left(\frac{15}{40}\right)^l\left(\frac{5}{40}\right)^m$
