There is no rule that says that the party with the largest number of seats gets first attempt. It is the previous prime minister who has first attempt, regardless of which is the biggest party.
If the combination of ALL other parties, Tory, DUP, Lib Dem, UKIP etc have less than Labour and the SNP combined, then they will not be able to pass a Queens speech or vote of confidence and so quite simply cannot cobble together any kind of government, no matter how much they may wish to.
As such, swapping SNP for Labour MPs makes precisely no difference in terms of the Tories' chances of being in government.
The mantra that 'the largest party gets to form a government' is quite simply a lie, being trumpeted by the Labour party in order to try and scare people into voting for them.