You need to talk to the girl's mother / your roommate again.
If things went down the way you describe them (make very sure you have all the facts in this down correctly before you talk to her - to me the girl's reaction to you not fixing her phone for the second time seems very excessive - might there be more to this than you can see?), then this is the first thing you need to do no matter what you later decide.
You're dealing with a 9-year-old girl whose behavior is completely unacceptable. The person responsible for correcting this is her mother. So you need to explain to the mother that you expect her to discipline her daughter.
You're sharing the same space, so there need to be some ground rules in how you live together, for example:
Nobody locks out anybody else. This goes especially for kids locking out adults.
You don't take each other's possessions without asking, and certainly don't break them or ruin them on purpose.
Sometimes things break. In that case, the one who broke them needs to take responsibility and offer redress.
You can expect a nine-year-old girl to know that, and a parent should realize that her child has behaved badly when confronted with the facts, so the fact that the girl behaves this badly and that the mother doesn't seem to care is deeply troubling and points to a larger conflict bubbling under the surface (see my last paragraph for an idea what it might be).
If you can't get the mother to stick to the topic/agree to discipline her child, then there are three things you can do:
You can discipline the girl yourself. Don't hit her. Talk to her, explain to her what you expect from her (especially in regards to your son), and if necessary punish her in some meaningful way if she continues her bad behavior. This is likely to cause conflict with your roommate, but it's also possible that she won't mind if her child gets disciplined by someone else, as long as she doesn't have to do it. There are parents out there who believe that they need to be their children's best friends. Maybe she's one of them.
You can swallow deeply and buy the girl a new phone in the hopes that this will restore her previously normal behavior towards your son. This might keep the peace in the apartment if the whole thing was really just about getting a broken phone magically fixed, but at a cost: You'll have to placate the girl whenever a whim strikes her, and you'll have to live with the fact that a nine-year-old thinks she can behave any way she wants towards you and your son.
You find other living arrangements as fast as possible and move out.
Finally, here's something else to consider: Maybe the girl behaves so terribly because she's fed up that she has to share the apartment with others (especially if that wasn't the case beforehand). So maybe it's not really about the broken phone - maybe she's trying to get rid of you. This would explain the terrible behavior, the phone that broke when your boy wasn't around, her ruining your sons things and her locking both of you out of your rooms, telling your son it's not his room. If that's the case, then you'll need to swallow your anger and frustration and get everyone together in order to talk about how difficult the cramped living is for everyone, ask everyone what bugs them the most, and come up with ideas to lessen everyone's frustration with one another (e.g. maybe plan the week so that there are days where one family has the apartment mostly to themselves for the afternoon and so on). Also, communicate your medium-term plans so everyone knows the current situation is temporary.