Yes, but Η κότα και το αυγό της. can be Her chicken and egg but here because of the nature of the objects (a hen and an egg) it is better to use η κότα της και το αυγό της. If it was το στυλό και το μολύβι του=his pen and pencil it is ok not to use του twice because a pen can never own a pencil. But a hen can own an egg, so it advisable to use της twice.
I think that is because here it says της suggesting the chicken is female (and also using κότα which is female as far as im aware), but with the horse the sentence did not indicate whether it was female or male as αλογος is a horse (but this word does not specify if this is a female or male horse)