Please update us on how things are going now. From what I gather, you have a uNPD ex with a child now of school age and a uBPD spouse with a preschooler, right? Both are yours?
With many of us our marriages continued to implode due to the disordered and acting-out nature of the PDs. Mine did, despite all my efforts it failed, like a slow moving train wreck and then suddenly.
It would be nice to hear you, your ex and your spouse are getting therapy (separately of course) so as to improve everything. However, the reality is that we often don't get what we want, desire or hope for. That's life. You work with the cards in your hands and maybe one or two up your sleeve, so to speak.
If need be and if things have deteriorated, you're welcome to post over on the Separating and Divorcing board. In such situations you need practical and legal advice appropriate for your location and appropriate for your situation. Though we here are only peer support and can't give legal advice, we've accumulated much collective wisdom over the years and willingly share it. You don't have to walk alone.
For example, if it does look like you need legal help and want to avoid common separation pitfalls and mistakes, we highly recommend this inexpensive but crucial guide by William Eddy,
Splitting: Protecting Yourself While Divorcing Someone with Borderline or Narcissistic Personality Disorder.
One thought is concerning your parenting time with the children. Courts are often accommodating and synchronize parenting time so your kids aren't kept apart. Courts can also limit how much distance the mothers can put between you and your kids. Pursue that possibility. Well, could be more difficult if the mothers are far apart from you and each other.