He continued work on LOTR, completing the epic tale in 1949. At this time, he was unsure if his reworked “Riddles in the Dark” chapter would ever be printed and, if so, whether those who read the first edition version would buy a new copy of the updated text. So he decided to cover his bases.
LOTR included a prologue covering many subjects to welcome new readers and set up the new story for established fans. Part Four, “Of the Finding of the Ring,” covers Bilbo’s adventures in The Hobbit. It lays out the events of the riddle game as we now know them in the second edition onward. However, there is also a disclaimer to explain why there are two different versions of the story: one where Bilbo is freely offered the ring as a riddle prize and is happily escorted out of the caves and another where Bilbo steals the ring and barely escapes a wrathful Gollum.
This prologue claims that the first edition’s alternate text was a lie that Bilbo told traveling companions Gandalf and the dwarves, and subsequently wrote in his memoirs (which is what The Hobbit is framed to be in canon).
“But many copies contain the true account (as an alternative), derived no doubt from notes by Frodo or Samwise, both of whom learned the truth, though they seem to have been unwilling to delete anything actually written by the old hobbit himself.”The Fellowship of the Ring (Being the First Part of THE LORD OF THE RINGS).
This conflict comes up throughout the story proper as well. In Book One: Chapter Two, “The Shadow of the Past,” Gandalf relays his worries on the subject to Bilbo’s nephew, Frodo Baggins.
“…I heard Bilbo’s strange story of how he had ‘won’ it, and I could not believe it. When I at last got the truth out of him, I saw at once that he had been trying to put his claim to the ring beyond doubt. Much like Gollum with his ‘birthday-present’. The lies were too much alike for my comfort.”The Fellowship of the Ring
Later, Bilbo comes clean at the Council of Elrond in Book Two: Chapter Two.
‘Very well,’ said Bilbo. I will do as you bid. But I will now tell the true story, and if some here have heard me tell it otherwise’ — he looked sidelong at Glóin [a dwarf who accompanied Bilbo in The Hobbit — ed.] – I ask them to forget it and forgive me. I only wished to claim the treasure as my very own in those days, and to be rid of the name of thief that was put on me. But perhaps I understand things a little better now. Anyway, this is what happened.’The Fellowship of the Ring
With these elements locked in, Tolkien could rest easy knowing that if LOTR was published someday, his vision would be intact.