The total number of ways in which 4 animals can be drawn from 7 animals is .

For X=0, all the 4 animals are drawn from the 5 ducks which can be done in ways. So

For X=1, 1 goose is chosen from 2 geese in ways, the other 3 are chosen from the 5 ducks in ways. So

For X=2, 2 geese are taken from 2 geese in ways, the remaining 2 being chosen from the 5 ducks in . So

The probabilities come out to be , and respectively (which add up to 1, as expected).

These answers has to be same as in your book.

If you still have any confusion, you can ask.