i imagine there would be some scandal created to make out that Robb was not his natural son, but born of his wife's adulterous behaviour whilst he was at war with Robert...
I doubt it would be difficult. Though Robb would certainly NOT take it lying down like Samwell the Wimp did. (yes i know he's no longer that fat tub of lard he started as, but in the beginning he was).
Perhaps a large part of the accusations and trial of Tyrion was Tywin's attempt (successful might i add) of removing Tyrion from any possibility of inheriting Casterly Rock.
I imagine that the traditional line of succession would be rather similar to the English lines of succession which obviously include women, but Sons come before daughters, and daughters come before brothers, nephews and even uncles.
the british line currently goes:
1. Elizabeth II -> 2. Charles, Prince of Wales -> 3. Prince William -> 4. Prince Harry -> 5. Prince Andrew Duke of York-> 6. Princess Beatrice -> 7. Princess Eugenie -> 8. Prince Edward Earl of Wessex-> 9. James, Viscount Severn -> 10. Lady Louise Windsor -> 11. Princess Anne, the Princess Royal -> 12. Peter Phillips -> 13. Zara Phillips.
The succession then continues with the children of the late Princess Margaret, and thence onto the Queen's cousins. As you can see there are many females in the line, higher up than many of the princes. However, even though Princess Anne is older than both Prince Andrew and Prince Edward, she comes in after them, and their children, male and female. This is a good example of the most recognisable royal succession type in the Royal families of the world today, and is called Primogeniture, or sometimes Male Primogeniture - where males are favoured over females and where the senior line of succession always takes precedence over a lesser line. Most Noble families follow the same succession, but they do differ depending on the nature of the rules of succession set out when the Title was created.
There are others that place ALL surviving males of the Line above all females. There are also those that exclude Females all-together, The Japanese Imperial Throne has a succession like this.
Dorne presents us with the only line of Succession that doesn't favour male over female... This is rare, but not unheard of in our own world. Sweden, Belgium, Norway and the Netherlands are like this. this is called Absolute (or Equal) Primogeniture. wherein, females receive all the same rights of successsion as males.