How to handle situation with my stepson

I need to gain some perspective on this. My stepson (12) is coming to live with my husband and I after things with his mother turned sour, it’s been a long time coming. A little backstory is that my stepson has witnessed, for years now, his mother’s constant cheating on his dad, bringing various men home, after my husband and her split up, to live with them (4 different men in 6 years), and her constant drinking and selfishness. This kid has gone through a lot and has always lived in the shadows of his older brother and it’s gotten to him. My stepson has opened up to me about what he sees, hears, and feels, but not his biologicals. I have said from the get go that all of that will come to bite them on the ass, but apparently I know nothing about parenting (I’ve raised 2 children, who are adults now), and they let bad behaviors slide and don’t really discipline their children. It’s to the point where my youngest stepson is skipping school, mouthy, disrespectful, and his mother no longer wants him in her home. She took all his electronic devices away and grounded him, but then my husband suggested he come here this weekend for the weekend and automatically he’s given back his phone, tablet, xbox, etc. I voiced to my husband that he should still be on grounding and not have his devices to ensure consistency with discipline and that his son doesn’t think that because he moves in with us that there are no rules or discipline here. The kid missed nearly 2 straight weeks of school because he was up all night on his xbox and didn’t want to go to school, he’s failing everything in school, and he takes no responsibility for what he does. I think the punishment should stand, but my husband is babying him.

What am I to do?