The way I explain myself the construction of the phrase is like this:
her -> ihr (Genitiv to express possession)
mit demands Dativ, so the whole particle "her child" must be Dativ
Dativ for neutrum (das Kind) demands "em" (dem, der, dem, den)
Another pronoun that would give the same result (ihrem) is "their", as explained by Katherle.
This logic worked for the exercises I encountered until now in this lesson, however it would be better if someone who knows German confirmed this.