I know that our faith is justified by works and that the faith of the Bible is an obedient faith. Therefore, faith encompasses baptism and it isn't a meritorious work. However if we are obedient in our faith wouldn't it be counted to us as righteousness as it was Abraham? If so, why would Titus 3:5 tell us that works of righteousness do not save us.
I also find it ironic that it seems to contrast works of righteousness and the washing of regeneration which I believe is baptism.
Supposed you lived under the Law of Moses. God commanded of the Israelites sacrifices. Those sacrifices would be righteous works because God required them. A person could not please God by ignoring those sacrifices. Yet, at the same time, those sacrifices were not enough to save a person. Many Israelites thought that they could make up for their sins by offering extra sacrifices.
"Hear the word of the LORD, you rulers of Sodom; give ear to the law of our God, you people of Gomorrah: "To what purpose is the multitude of your sacrifices to Me?" says the LORD. "I have had enough of burnt offerings of rams and the fat of fed cattle. I do not delight in the blood of bulls, or of lambs or goats. When you come to appear before Me, who has required this from your hand, to trample My courts? Bring no more futile sacrifices; incense is an abomination to Me. The New Moons, the Sabbaths, and the calling of assemblies - I cannot endure iniquity and the sacred meeting. Your New Moons and your appointed feasts My soul hates; they are a trouble to Me, I am weary of bearing them. When you spread out your hands, I will hide My eyes from you; even though you make many prayers, I will not hear. Your hands are full of blood. Wash yourselves, make yourselves clean; put away the evil of your doings from before My eyes. Cease to do evil, learn to do good; seek justice, rebuke the oppressor; defend the fatherless, plead for the widow. Come now, and let us reason together," says the LORD, "though your sins are like scarlet, they shall be as white as snow; though they are red like crimson, they shall be as wool"" (Isaiah 1:10-18).
God isn't saying that He wanted Israel to give up the sacrifices He had commanded. He is saying they had to stop sinning -- if they would not stop sinning, then God didn't want these sinners' sacrifices. It would make up for what they were doing. The sacrifices become a useless, meaningless act.
"For we ourselves were also once foolish, disobedient, deceived, serving various lusts and pleasures, living in malice and envy, hateful and hating one another. But when the kindness and the love of God our Savior toward man appeared, not by works of righteousness which we have done, but according to His mercy He saved us, through the washing of regeneration and renewing of the Holy Spirit, whom He poured out on us abundantly through Jesus Christ our Savior, that having been justified by His grace we should become heirs according to the hope of eternal life" (Titus 3:3-7).
God did not save people because of the good things they had done. All the good and righteous acts we do will not make up for the fact that we were sinners. It doesn't matter how many times a person is baptized or how many times they were kind to the poor or how many worship assemblies they attended, none of those acts are enough to make up for the fact that we've sinned.
The reason we are saved is solely because God chose to send Jesus to die on our behalf. That gift is accessed through the teaching of God's Word (Romans 1:16) and baptism (Romans 6:3-7). Therefore, we cannot be saved without obeying God, but those acts of obedience do not earn us salvation -- they don't make God obligated that He must save us.
Thus, baptism saves because of Jesus' sacrifice and resurrection. "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). You cannot be saved with obeying God by being baptized and at the same time that baptism doesn't earn you salvation.
To see this, realize that a person who is baptized, but remains in his sins, having no intentions of repenting of his past deeds or changing his life. Though he has done an act that God requires, that act will not save him because he remains in his sins. It becomes a useless, meaningless act.