The short answer is that neither St. Luke’s genealogy of Jesus nor St. Matthew’s (Matthew 1) presumes to deal with the age of the Earth. Matthew’s traces Christ’s lineage from King David, showing that Jesus is both the Messiah and king of Israel. Luke’s goes back to Adam, illustrating that Jesus is the Savior of all mankind.
However, in saying that Adam is a “son of God,” Luke is not asserting that creation overall, let alone the earth in particular, began several literal twenty-four-hour days before the creation of Adam and Eve, although many young-Earth advocates hold that view.
The Church has not taken a definitive stand on the ages of the universe and Earth, and it likely won’t, because these are scientific matters, not religious ones. The Church does affirm, however, that God created both. Scientists generally believe that the universe is about 13.8 billion years old and the Earth about 4.5 billion. Scripture teaches us “that with the Lord one day is as a thousand years, and a thousand years as one day” (2 Pet. 3:8). So one should be cautious in reading too much into “the seven days” of creation recorded in the Book of Genesis.
For more information on the Church’s perspective on Adam and Eve, evolution, and the respective ages of the universe and Earth, please see this Catholic Answers tract.