And all the circumcised believers who had come with Peter were amazed, because the gift of the Holy Spirit had been poured out upon the Gentiles also. For they were hearing them speaking with tongues and exalting God. And he ordered them to be baptized in the name of Jesus Christ. Then they asked him to stay on for a few days. Peter is saying that these people were now Christians just like he and his companions.
Baptism comes later.
Peter says because they've already received the Spirit , they can now be baptized. The Acts 10 passage seems completely inflexible in its meaning. By all appearances, Acts 10 is univocal. Baptism isn't necessary for salvation. The problem with this view, though, is that it creates a contradiction later in Acts.