OP, just have confidence that it is not your job to fix what is happening in their marriage. You have to tell them confidently in your role as equal partner to them, that their dysfunction is affecting your sense of security and they should 'sort it out!' If that means that they both make more of an active effort with each other than good, maybe they need to take some alone dates on their days off instead of being together as a threesome?
Ask yourself this also, why is she jealous that 'you' are spending more time with 'him' than 'him' spending more time with you'? Is this because you and her have a more secondary relationship or doesn't she value your relationship? This does not bode well for the future.