There cannot be much time between Gen 42 and Gen 46 as Gen 45:11 tells us that it was the second year of the famine and there were another five years of famine left.
The more likely understanding of Gen 42:37 is either:
- Reuben simply offers two of his four sons, or,
- The elder two of Reuben's sons were old enough to be considered working men and the the younger two were still "underage" and not men.
Either of these is consistent with the text. The Pulpt Commentary suggests:
Slay my two sons - as Reuben had four sons (Genesis 46:9), he first be understood as meaning two of my sons (Ainsworth, Murphy),
either the two then present (Junius) or the two oldest (Mercerus)
Gill also arrives at a similar conclusion:
saying, slay my two sons, if I bring him not to thee; meaning not Simeon, who was in Egypt, but Benjamin, whom it was proposed to take
thither, and whom Jacob was very loath to part with; and to persuade
him to it Reuben offers to him, and gives him leave to slay his two
sons, or rather two of his sons, since he had four, Genesis 46:9;