Jesus had just prayed "All things have been handed over to me by my Father" and "No one knows who the Father is except the Son chooses to reveal him." (10:21-24).
Then a lawyer stood up to test Jesus. From the text, I'm not sure whether he has walked in among the group of seventy that have just returned joyously from their mission or whether we are being told about a totally different occurrence.
In either case, this expert asks a provocative question--we're assuming provocation over sincerity since Luke says he asked it to test Jesus. "What must I do to inherit eternal life?"
Tangent: Even after looking up the Greek words that are translated as "do" and "inherit," in my Thayer's Greek-English Lexicon, I don't know what the connotations of the word "inherit" is. I think I have usually read this question as if he asked what he had to do to deserve or merit eternal life.
If the expert had asked the question to see if Jesus could get the answer right, then I think he would have been reassured on that point anyway. Jesus told him that since the answer to his question was in the Bible, he could recite it himself.
And he could and he did, "You shall love the Lord your God with all your strength and with all your mind and your neighbor as yourself." (Deuteronomy 6:5 and Leviticus 19:18)
He had asked about how to inherit eternal life and Jesus responded by asking him what the Bible said. He responded to Jesus' questions about the law by quoting passages about loving God and loving neighbor.
Leaving aside the concern about whether believing or doing is more important--or even if we can do one of those without the other--the lawyer answered the question about eternal life by talking about something that begins immediately. Eternal life does not have to wait until after we die. It can be now.
Another tangent (but to me not an unimportant one): Asked a very important question, Jesus quotes the scriptures, what we often term the Old Testament. He does not make a distinction between the Old Testament God and the New Testament one.