In Romans chapter 4 it talks about Abraham being saved by belief. “For what saith the Scripture? Abraham believed God, and it was counted unto him for righteousness” (Romans 4:3). Did they baptize in the Old Testament? Nowhere that I have read. Now you might say that baptism wasn’t required in Old Testament days, but at the end of Romans chapter 4 it says, “Now it was not written for his sake alone, that it was imputed to him; but for us also, to whom it shall be imputed, if we believe on him that raised up Jesus our Lord from the dead; who was delivered for our offences, and was raised again for our justification.” So it is telling us we are saved as Abraham was saved, by believing and receiving justification through our faith. Now if baptism is only required after Old Testament times, then how can the verses say we are saved as Abraham was?
The problem with your argument is that you have disregarded the New Testament teaching that the Old Testament is no longer in effect. "For He Himself is our peace, who has made both one, and has broken down the middle wall of separation, having abolished in His flesh the enmity, that is, the law of commandments contained in ordinances, so as to create in Himself one new man from the two, thus making peace, and that He might reconcile them both to God in one body through the cross, thereby putting to death the enmity" (Ephesians 2:14-16). It was necessary that the Old Law be removed so that we might live under the new law of Christ. "Therefore, my brethren, you also have become dead to the law through the body of Christ, that you may be married to another--to Him who was raised from the dead, that we should bear fruit to God" (Romans 7:4). See "Why We Don't Follow the Old Testament" for further details.
When you go back to the Old Tesatment as justification for a practice, James warns that you can't just pick your favorite commands. The Old Testament is a package. If you claim justification by one command, you must also accept all other commands. "For whoever shall keep the whole law, and yet stumble in one point, he is guilty of all. For He who said, "Do not commit adultery," also said, "Do not murder." Now if you do not commit adultery, but you do murder, you have become a transgressor of the law" (James 2:10-11).
Abraham lived under a different covenant that had different terms. Yes, Abraham was justified by his faith, but it wasn't by his faith alone. "But do you want to know, O foolish man, that faith without works is dead? Was not Abraham our father justified by works when he offered Isaac his son on the altar? Do you see that faith was working together with his works, and by works faith was made perfect? And the Scripture was fulfilled which says, "Abraham believed God, and it was accounted to him for righteousness." And he was called the friend of God. You see then that a man is justified by works, and not by faith only" (James 2:20-24).
Let us take one example, Abraham was required to be circumcised. "This is My covenant which you shall keep, between Me and you and your descendants after you: Every male child among you shall be circumcised; and you shall be circumcised in the flesh of your foreskins, and it shall be a sign of the covenant between Me and you. ... And the uncircumcised male child, who is not circumcised in the flesh of his foreskin, that person shall be cut off from his people; he has broken My covenant" (Genesis 17:10-11, 14). It should be clear that Abraham would not have been justified if he was not circumcised. Yet today, under the law of Christ, circumcision is no longer required. "Stand fast therefore in the liberty by which Christ has made us free, and do not be entangled again with a yoke of bondage. Indeed I, Paul, say to you that if you become circumcised, Christ will profit you nothing. And I testify again to every man who becomes circumcised that he is a debtor to keep the whole law. You have become estranged from Christ, you who attempt to be justified by law; you have fallen from grace" (Galatians 5:1-4).
Notice that Paul applies the same rule James expressed. If you use a part of covenant, you have to accept the consequences of keeping all of the covenant. But the old covenant of Moses was before the saving sacrifice of Christ. To go back to that old covenant is to reject Christ's sacrifice; hence, you end up falling from the grace of God's gift to mankind.
Yes, baptism did not exist under the old law. But then, neither did Christ's sacrifice and without Christ's sacrifice you cannot be saved.
"Corresponding to that, baptism now saves you--not the removal of dirt from the flesh, but an appeal to God for a good conscience--through the resurrection of Jesus Christ" (I Peter 3:21).