No human solution exists to problem of sin. Life is not a problem not be solved. Except for grace of God, all will be eternal losers. These Corinthians responded out of desperation. Baptism apart from grace has no meaning.
Baptism alone is like empty setting on a ring.
Even the response we make to grace is a gift from God. We cannot create our own response. Our faith response is not a legalistic, meritorious act. Persons who attempt to call baptism a work assume James 2 is dialoging on conversion rather than on the dedicicated Chritian life. James' topic is not Paul's.