This synonymous use of faith and obedience did not originate with the inspired men of God. Except a man be born of water and the Spirit, he cannot enter the kingdom of God. Water, and water alone, never saved anyone. Nor is pardon to be found in the abstract act of baptism. Pardon takes place in the mind of God, and is given in response to our faith and obedience to His will.
Faith is the actuating motive that leads to baptism and makes it effectual.
There is no efficacy in baptism, without faith. But when our faith is great enough to accept God at His Word by submitting to the ordinance of baptism, He is pleased to remit all our past sins. Here, you will notice the apostle Paul places baptism on one side of the ledger, and the works of righteousness on the other. Baptism is not a work of righteousness. The two are in direct opposition to one another.