Dorne never joined for Lannister, Dorne hates the Lannisters with a passion (The lannisters raped and killed Elia Martel 15 years ago, Dorne has never forgiven the Lannisters for this, and probably never will), they declared for Renly and then when Tyrion married Myrcella to one of Martells children, Dorne became neutral where they remained for the rest of the war of 5 kings.
The Reach declared for Renly, but Tywin convinced Mace Tyrell to declare for Joffery when Renly died, but had Stannis taken Kings Landing then the Reach would have probably remained neutral. (Mace wanted to remain neutral in the war but declared for Renly because his son Loras begged him too, and then declared for Joffery when Tywin promised Mace that Joffery would marry Mace's daughter, with Joff dead, Mace has nothing to gain in joining the war)
Mace would have had nothing to gain out of a war with any of them and so would have chosen to remain neutral.
Then SEMI-SPOILER ALERT (I say semi because its not so much of a surprise) a few years later we would have a Targaryen land, Dorne would declare for the Targaryens and would probably win the war.
In any case, with Kingslanding gone, Tywin would have less motivation to fight, and Robb may be able to negotiate peace. That was his plan.