Cat and Robb were both dumb.
They would've never been able to siege Kings Landing with the forces they had at their disposal.
Their ill fated expedition could've only ended in failure.
If it was just Cat leading things, it probably would have ended in a Vietnam situation where the Lannister's just say fuck it and pull out and the North rules themselves, which is what they eventually ended up wanting anyways.
The Starks kidnapped Tyrion and in response Tywin had invaded the Riverlands.
Robb pledged to save the Tully's and thus they joined his armies. However, that meant that he spend a lot of time fighting the war in the Riverlands far away from Kings Landing.
And by the time it was finally in the cards to move further south he was betrayed by Frey (and Theon). Robb was a fool he never had a chance to take Harrenhall on he way to KL let alone Kings Landing itself.
Even if he had won and made it as far as KL he had made Stannis his enemy and the Baratheons would've just dealt with the survivors of whoever won the Lannister/Stark war.
I believe that is part of the reason why old man Frey didn't feel much remorse for betraying Robb Stark outside of the personal reasons. After all, he knew the war would end if he stopped Robb at the Twins and that even if Robb won a few more battles he would never have been able to win.