How can I explain salvation of people, like Abraham, Moses and David, who existed before the death of Jesus, when He makes a statement "He is the only way"? Your reply will be very much appreciated.
Like you say, the Bible makes it plain that salvation is found in no other name than in Jesus Christ. Obviously, people are not saved in the name of Buddha or of Joseph Smith. Only in Jesus are we saved. He is the only way (John 14:6). This brings up the obvious question. If it is true that only in Jesus are people saved, does this mean that absolutely no one who has not been baptized into Christ will be in heaven? Clearly, this cannot be taken as a biblical position, as we know, for example, that Moses and Elijah will be in heaven. I assume that many people who lived before Jesus died on the cross will be with us in heaven.
Does this mean that people who were not baptized–that people who had not even heard of Jesus were saved in Jesus? This does not appear to make sense. Let me explain what I believe to be true on this question. First, I believe that those who are "saved" in the sense of Acts 4:12 ("Salvation is found in no one else, for there is no other name under heaven given to men by which we must be saved.") are not all those who will be in heaven. This may sound surprising and perhaps confusing, but let me explain. I define "saved" to be those who are baptized into Christ and have therefore received the promised gift of the Holy Spirit (Acts 2:38). These people have a deposit, guaranteeing their salvation until the Day of Christ (Ephesians 1:14 and other passages). Their salvation is a done deal, so to speak. Their name is written in the Lanb’s book of life.
I also believe that others will make it, but their salvation during life in the body was not guaranteed in the same sense that a Christian, baptized into Christ is saved. John the Baptist will be heaven. The thief on the cross was granted forgiveness by Jesus. I assume that he will make it as well. I assume that Elijah will make it also. However, neither John the Baptist, nor the thief on the cross and not even Elijah were saved in the same sense that we are. They did not have the indwelling of the Holy Spirit that we do. Like it says in Revelation 13:8, Jesus is a "lamb that was slain from the creation of the world." Those before the death of Jesus could not be baptized into Christ, but I believe that according to God’s grace, some will make it to heaven, but their assurance is not what we have.
God is the judge and I choose to trust his justice. No matter what, even if King David makes it to heaven, it will not be because of his righteous life, but because of the blood of Jesus. So, like I said, this can potentially be confusing, but I believe we can biblically establish that salvation is only "in Christ," yet there will be people with God in heaven who were not "saved" in the New Testament sense of being a Christian. They will be forgiven in the end, by the blood of Jesus, but will not have been saved while in the body on earth.