Luke 10:25-26. 'And behold, a certain lawyer stood up and tested Him, saying, "Teacher, what shall I do to inherit eternal life?" He said to him, "What is written in the law? How do you read it?"'
Acts of the Apostles 16:30-31.'And he brought them out and said, "Sirs, what must I do to be saved?" And they said, "Believe on the Lord Jesus Christ and you will be saved....."'
Two similar questions; two rather different answers. How so?
I think Rita was closest. :) The lawyer did not see himself as a sinner; he was 'testing' our Lord. So the Lord Jesus referred him to the law. And the guy replied, quite correctly,
"you shall love the Lord your God with all you heart, with all your soul, with all your strength and with all your mind, and your neighbour as yourself." But he didn't ask himself, "Do I really do this?" And of course, none of us do, which is why we need a Saviour. So when the Lord Jesus said,
"Do this and you shall live," he suddenly realised that he had to qualify what he had said.
"And who is my neighbour?" So our Lord tells the parable of the Good Samaritan for no other purpose than to convict this lawyer of his sin and it is a wonderful example of preaching the law for that very reason.
The Philippian jailor, on the other hand was already convicted of sin. He came
'trembling' before Paul and Silas. He had heard them singing hymns of praise to God and then seen the earthquake loosen all their chains. There was no need to preach the law to the jailor; he was already in the fear of God.