This is so hard. There's no easy way to do it. Kids sometimes have their reasons all in order, and sometimes they have their reasons all mixed up. The "weekend" house is often the "grass is greener" house. Sometimes kids rebel against Parent 1's discipline and choose Parent 2. Then they move in and it's a whole new adjustment to a whole new life, and it's not so simple.
Sometimes kids need their other parent, particularly the same sex parent. It's really, really hard for the main custodial parent to let go too.
My stepdaghters were unhappy with their mother - lots of problems, from Mom's low-life boyfriends and nights out at rock concerts, to neglected medical needs, to substandard schools. The younger one was spoiled and the older resented it, and wanted to move in with her father and me. When it came down to it, she couldn't go through with it because her mom guilt-tripped her. The mom said she wouldn't visit her, and the kid said to my husband, "She's not like you. I'll see you no matter where I live. But I won't see her because she won't care enough to drive." The torture was too much for the poor kid.
So it's impossible to advise you without knowing all the background. I do think it's worth a series of discussions between Mom and Dad. Maybe there are some changes that can be made to meet everyone's needs. My advice to you as the stepmother is to stay out of the discussions entirely. Leave the room, saying, "I love you, kiddo, but this is between you and your dad and your mom." It will not go well if you appear to be going up against the mom.