I can find a question with no difficulty; a good answer may be harder!
But as a mother of twins, I will certainly try. It sounds as though Sister B is really struggling to find her own identity. That may sound like psychological jargon (which I usually avoid), but I can't think of a good synonym. It is as though, in her developing mind, she somehow overlaps with her twin sister—needs to have on the same clothes, hurts if her sister is punished, etc. She finds part of her own self in her sister. I could reverse that and say that she finds part of her sister in her own self and hasn't quite got this sorted out in her own mind.
Chances are Sister A has some of the same tendency but doesn't show it so obviously. This kind of behavior is very common in identical twins. But how can it be otherwise in two beings who look and sound so much alike? Certainly I saw some of it in my twins, who were not only not identical but were boy-girl fraternals.
I'll give you an example. My daughter was obviously "ready" to walk more than a month ahead of her brother. She would stand holding on to the foot rail of her high chair, just waiting to move out. Her brother, shaky on his feet but an excellent crawler, would repeatedly speed across the room, grab her by her diaper, and pull her down. However, once he was "ready" to walk, he somehow said "Go ahead" to her, and they both walked. He never again pulled her down. The point of my story is that you can expect a lot of this sort of overlapping and undifferentiated behavior.
As for the pinching of Sister A and of you, it is part of the same struggle. Sister B, who doesn't quite understand how she and Sister A differ, seems to perceive her twin as more competent. And probably she sees you as more accepting of Sister A. So she strikes out occasionally at both of you. You have put your finger on one of the needed remedies: do as much with each girl individually as you possibly can. Next year's school arrangement (only a few months away now) should be helpful.
Our parenting advice is given as suggestions only. We recommend you also consult your healthcare provider, and urge you to contact them immediately if your question is urgent or about a medical condition.