(Lk. 10:25-28) Can we earn salvation through the Law or not?

CLAIM: Jesus told the lawyer that he should follow the Law and give to the poor in order to inherit eternal life. How does this harmonize with the ubiquitous NT teaching that salvation cannot be earned through the Law (Gal. 2:21; Eph. 2:8-9?

RESPONSE: See comments on Romans 2:7.