Moshe chose able men out of all Israel, and made them heads over the people: authorities over thousands, authorities over hundreds, authorities over fifties, and authorities over tens. They judged the people at all times; the hard cases they brought to Moshe, but every minor case they judged themselves.
Moses let [Yitro] depart, and he went to his own land. (18:25-27)
These lines are chronologically problematic for two reasons. 1) Moshe retells the story of the judge selection in Devarim 1, but there it seems that selection of judges came after the giving of the Torah, whereas here it is told before the giving of the Torah. 2) "Yitro" seems to go home immediately after this story, but according to Bamidbar 10:29-30 "Hovav" stayed with the Jews until long after the giving of the Torah. And there is reason to think that Yitro and Hovav were the same person (even if you're normally skeptical of midrashic name-equations).
I would add a third question. Why exactly do we need to know that Yitro went home? What does this line add to the story?
We can understand these verses by looking back to last week's parsha. There, the Torah tells us about the manna which began falling and kept the Jews alive in the desert. At the end of the story (16:35), we read that "the descendants of Israel ate the manna for 40 years, until coming to a settled land". This line could not have been written until the end of the 40 years, and thus chronologically it belongs at the very end of the Torah. But we accept it here, without a second thought, because it's informative and obviously not meant to be chronological. And it's more logical to put this line here, with the rest of the manna story, than to stick it into some random place in Sefer Devarim.
The same logic applies to the Yitro story. Most of the story takes place within 24 hours of Yitro's arrival. But - and this should be obvious, though for some reason nobody thinks of it - Moshe's choice of judges clearly cannot have taken place that same day. Moshe had to choose judges over "thousands... hundreds... fifties... and tens" of people, for a total population of at least 600,000. It would be impossible to appoint all these thousands of judges in one day. Like the 40 years mentioned in last week's parsha, the period of picking judges actually took a long time, and is only mentioned here to "finish off" the topic even though its chronological conclusion was much later.
With this understanding, the final line of the story makes much more sense. The chronological problem is solved, since Yitro only left after all the judges were chosen, which could easily have been a full year later when Hovav is recorded as leaving. (If Yitro and Hovav are different people, of course, there never was a chronological problem.) And the question of why we learn about Yitro's leaving can be answered as well. Apparently Yitro would have been willing to leave the day after he had come. But since he had come up with the idea of judges in the first place, he stuck around as an advisor until the plan was successfully implemented. From the fact that Yitro postponed his departure until all the judges were chosen, we learn that he was not only smart enough to make useful suggestions, but dedicated enough to put in effort and make sure that they were actually carried out.
(Partial source... not from Gush for once)