ihr is only wrong because the answer expects five letters and after typing three you should see there's still more room for more word, so it can't be
ihr :) I've commented that I don't think this is good UI for language instruction, but I know the devs have a ginormous todo list so understandably this isn't the highest priority. Plus it's just my guess anyway.
As for this particular sentence and why
deren is used, I can't say. Normally you use
deren to clarify ambiguity that
ihr would create. For example, consider the English "The Smiths invited the Joneses and their son." Does the son belong to the Smiths or the Joneses? English is ambiguous here. In German, you could use
ihren but then it's the same ambiguity. But then
deren steps into the ring!
Die Smiths haben die Joneses und deren Sohn eingeladen.
Deren here means
their but specifically refers to the Joneses, not the Smiths.
In the case of your sentence, such ambiguity doesn't exist, so I don't know. I'm just sharing a bit of knowledge about
deren with you both for you to learn and, more selfishly, because by explaining it to you I come to understand it better myself.