Water baptism came after he was saved.
Water baptism is a sign one is saved and has nothing to do with New Testament salvation as stated by Peter himself (1Pet.3:21), who states water baptism is a figure of salvation.
"The Baptism of the Holy Spirit" that you speak of is only recorded twice in the New Testament: at Pentecost and with Cornelius. Water baptism, which is the baptism that is mentioned in all 10 conversion stories in Acts, is the baptism that is commanded by Jesus himself (Mark 16:16). It is also the baptism commanded by the apostles (Acts 2:38).
As for what Peter says in 1 Peter 3, you are missing the point. He is saying that the water itself doesn't save us. That is true. By being baptized, a penitent sinner is doing as God commanded him, and having their sins washed away. (Acts 22:16)