Does this work the other way around, i.e. جدتك زانيا يا سام?
Yep, it should be (don't know about Duolingo's algorithm though)
It’s almost but not exactly the same. The original sentence states that Rania has the relationship ‘grandmother’ with you while your sentence says that it is Rania who is your grandmother.