Those who were baptized with water at Acts 2:38 were saved the moment when they believed, as witnessed by the Lord Jesus' words here:
" Verily, verily, I say unto you, He that heareth my word, and believeth on him that sent me, hath everlasting life, and shall not come into condemnation; but is passed from death unto life"(Jn.5:24).
We do know that before a person could be baptized with water that person must first believe, as witnessed by the following exchange between Philip and the eunuch:
"And as they went on their way, they came unto a certain water: and the eunuch said, See, here is water; what doth hinder me to be baptized? And Philip said, If thou believest with all thine heart, thou mayest. And he answered and said, I believe that Jesus Christ is the Son of God" (Acts 8:36-37).
Before the eunuch was baptized with water he was already "born of God" because he believed that Jesus is the Christ, the Son of God:
"Whosoever believeth that Jesus is the Christ is born of God..For whatsoever is born of God overcometh the world: and this is the victory that overcometh the world, even our faith. Who is he that overcometh the world, but he that believeth that Jesus is the Son of God?" (1 Jn.5:1,4-5).
There can be no doubt that the eunuch received eternal life and was "born of God" before he was baptized with water so we can know that being baptized with water does not contribute in any way to anyone being saved.