Indeed all who are saved are saved by proxy, by a Substitute. But the only Person who could ever be a saving Substitute for sinners is the incarnate Son of God, the Lord Jesus Christ, who "once suffered for sins, the just for the unjust, that he might bring us to God" (I Pet. 3:18). Recently, as I sought to tell a Mormon about salvation by grace through Christ our Substitute, he brought up the matter of salvation by proxy and "baptism for the dead." Sooner or later, you will be confronted with his doctrine. I write this to prepare you.
The subject of I Corinthians 15:29, indeed of the entire chapter, is the resurrection of the body. This verse of Scripture is a very simple declaration of a well established doctrine. In baptism the believer, rising up out of the watery grave declares his personal faith in Christ and his hope of the resurrection (Rom. 6:3-6). Moreover, Paul is here declaring that in our baptism we speak for, or on behalf of, deceased saints, declaring that they did not die in vain. They too shall rise from the dead. The resurrection of the body is the consummate work of God for the salvation of his elect. When believers are baptized they symbolically declare their faith in the resurrection of Christ, their resurrection with Christ representatively, their resurrection by Christ spiritually, their bodily resurrection at the coming of Christ, and the resurrection of all who have died in Christ when he comes again. This is Paul's doctrine in all his epistles and the meaning of his words in I Corinthians 15:29 - "baptized for the dead."