Ge 5:25 Methuselah lived one hundred and eighty-seven years, and begot
26 After he begot Lamech, Methuselah lived seven hundred and eighty-two years, and had sons and daughters.
27 So all the days of Methuselah were nine hundred and sixty-nine years; and he died.
28 Lamech lived one hundred and eighty-two years, and had a son.
29 And he called his name Noah, saying, "This one will comfort us concerning our work and the toil of our hands, because of the ground which the LORD has cursed."
30 After he begot Noah, Lamech lived five hundred and ninety-five years, and had sons and daughters.
31 So all the days of Lamech were seven hundred and seventy-seven years; and he died.
32 And Noah was five hundred years old, and Noah begot Shem, Ham, and Japheth.
Lamech thought that Noah would be the promised Seed, the coming Messiah, who would give them rest and comfort from the curse. Here Moses shows that the anticipation for the Messiah was alive even during ancient times.
Moses is teaching his Israelite readers here that just as Lamech had Messianic hopes, so Israel must wait for the promised Seed to come, who will give them rest and comfort.
Rest, comfort and deliverance comes from Him.