K.,
I think it's important to understand that your daughter feels replaced when your step-daughter comes over. She is too young to really understand why your step daughter is at the house, and why HER family is loving this other person, even though the other person is family too. Toddlers often have a hard time when a new baby is introduced in the home, because they are still very self centered and, as I said, cannot understand Mom can love you & sister.
I suggest you talk to her about family and include your step daughter in the talks, you if you or your husband have siblings, talk about how she & your step daughter are sisters just like you & Aunt Betty are sisters. Creating coorelations like that are helpful for toddlers. They are concrete thinkers, meaning they understand real things they can see or touch.
I also suggest you read books about family, sisters and step families, helping introduce the idea in her life. You should point out step siblings in the books and talk about your step daughter.
Next, when your daughter is mean to your step daughter, talk to her about her feelings, 'I know you feel angry when Sammy hugs Daddy, but we're family and we want to love each other. You can ask for a hug from Daddy after Sammy is done.'
It's important to teach toddlers HOW we want them to act instead of first punishing for bad behavior, because punishment does not teach. It's also tough to punish your toddler for expressing her feelings, because these actions are her ways of showing she is feeling insecure, so if you punish, you are pushing her away more.
While it's not ok for her to hurt your step daughter, and you cannot allow it to happen, you can redirect the behavior by understanding the underlying cause of the actions.
I wish you the best.
R. Magby