What an awful situation to be in, I can see how much you want to make the right decisions for your girl, to keep her safe and help her heal. It sounds like you're doing a great job of coping with your own pain while making hard decisions about what happens next for your daughter. It wasn't your fault this happened, you couldn't have foreseen it or prevented it. You didn't fail her.
Try not to give thought to the other girl - if it's been going on for 2 years, she was just 9 which is very young and does suggest she's possibly been abused herself. None of that is your concern, you don't need to feel any empathy for her at all, it's so natural that you would be angry, want to see her punished etc but letting the idea that she's carrying on as usual swirl around your head will drive you crazy. In her own way she's vulnerable too and other people need to help her - try to focus your attention on what your child needs and let other people worry about the other girl.
Try not to give thought to the other girl - if it's been going on for 2 years, she was just 9 which is very young and does suggest she's possibly been abused herself. None of that is your concern, you don't need to feel any empathy for her at all, it's so natural that you would be angry, want to see her punished etc but letting the idea that she's carrying on as usual swirl around your head will drive you crazy. In her own way she's vulnerable too and other people need to help her - try to focus your attention on what your child needs and let other people worry about the other girl.