Need advice about child custody

I'm sorry if this is the wrong group but I'm desperate for help. My cousin is 14 she's in a bad situation at home and has two different siblings. She "made friends" with a guy who made her feel safe and then manipulated her into taking bad pictures. He paid her a lot and her mom never caught on and allowed her to stay at his house. He tried to rape her and gave her herpes in the process. Her mom doesn't know he gave her the herpes and she's calling her a whore and was talking about it in front of her siblings and making fun of her. She tried to tell her mom what this guy was doing and she didn't believe her one of her siblings is still hanging out with this guy buying her stuff and she doesn't believe her sister either. Her mom also gives them drugs and alcohol. And let's them go and do whatever they want. Me and my husband want to get custody of her. I'm only 20 and my husband is 21. And we are currently staying with family. I want to take her to a different state to get away from this creepy guy because he is stalking her but I can't until i have custody of her. Her mom doesn't want to cooperate. I know she can sign a paper saying she wants to live with us but will the judge look at us not having a place right now and will they allow us to take her if we have a place in a different state. Do they look at income and what do I need to do to make them choose us.