Here's how:
* The "Old Road": The dwarves describe their journey as taking the "Old Road," which is the very same path that Bilbo, Gandalf, and the dwarves take through Moria.
* The Mines: The dwarves are specifically going to reclaim their "lost gold" from the mines, and the location of those mines is strongly suggested to be Moria.
* The Spiders: The story mentions the presence of giant spiders in the mountains, which are a defining feature of the underground realm of Moria.
* The Balrog: While not explicitly mentioned, the dwarves' fear of the "shadow in the deep" clearly foreshadows the presence of a powerful being, such as a Balrog, which later becomes a key element of the story in The Lord of the Rings.
Therefore, while not mentioned by its name, the events of The Hobbit heavily foreshadow and allude to the existence of Moria, establishing its significance in Tolkien's legendarium.