I wish I could give you a simple rule to follow that would help in this situation, but unfortunately, even native speakers often use ambiguous pronouns. For example, my wife likes to ask me:
Could you get that thing out of there and give it to her? Thanks!
Which thing? From where? Give it to who? What? I have no idea what she wants me to do.
Ok, so I exaggerate. But the point is that, sometimes you can understand from context what each pronoun refers to. Sometimes you have to ask for additional information.
In your example sentence we can make a guess that both "she" and "her" refer to Reemi not Sahani, because Reemi is the one who will have the book -- but we don't know for sure. If it's important, we have to ask for more information. When constructing these kind of sentences, if you think there will be any confusion, it's fine to repeat the noun.
Sahani will give the book to Reemi, and then Reemi will give it to her friend.
Can you get the book from under that magazine, and then put the book back on the shelf? Thanks.