If Tom takes 12 jelly babies he might take:
all 8 watermelon jelly babies and all 4 vanilla jelly babies, or
all 8 watermelon jelly babies and all 4 butter popcorn jelly babies.
So if he takes 12 jelly babies he cannot guarantee taking at least one of each flavour.
In each case the 4 remaining jelly babies will all be of the flavour he has yet to take, so taking one more jelly baby will ensure that he will have taken at least one of each flavour.