Zaproszenie dwóch byłych żon Marka było przepisem na katastrofę
is a situation or action that is likely to lead to a very bad or harmful outcome. In this case, it refers to the expectation that inviting Mark's two ex-wives to an event will result in chaos or trouble.