That's (someone's) problem spoken language informal
Said to express your opinion that someone should address their own issues.
A: Can you help me write the essay? B: No, that's your problem. I've already suggested some ideas to you.
A: John is asking for financial support because he had gambled all his money away. B: That's his problem. I'd lent him money several times, and he'd never paid back!
A: Mary is increasingly despondent over losing her earnings on gambling. B: That's her problem. I told her to stay away from that evil, but she didn't listen.
The origin of this phrase is not clear.
Come out of a difficult situation without a stain on one's character
I don't understand how he can fall in shit and come out smelling like a rose.