There is no contradiction here because in the verse that speaks of common salvation, the reference is made to a state of being saved, which all Christians should attain first, i.e. the presence of the Holy Spirit inside and a clear conscience so as not to drive the Spirit away (see 1 Tim. 1:19, Eph. 2:8; also see how the Spirit is salvation/eternal life in John 6:63), because it is written that we cannot do Gospel's prescriptions right "without Him" (John 15:5).
As for the second verse that speaks of working out the salvation, it refers to the kind of salvation that one doesn't die with (if a Christian dies with the Spirit, he goes straight to heaven, see John 6:47), but which one receives at the Judgement (to Judgement go all who die without the Spirit -- see the same John 6:47, plus Revelation 14:1) if he/she had done certain kind of works (here is where "to work out the salvation" comes from) and didn't trust in them for salvation when he/she died (see Matthew 25 judgement where those who ministered to Christians in need during their life receive salvation at the Judgement; also see the parable of the rich fool, where the grain symbolizes good works one had done during life, and where works are a fruit/creation of our hands in a way; after this parable note that God always minds it when we place our faith in something other than Himself -- see countless example from O.T.). Please also note that this is different from the place where Paul speaks of the time when each man's works will be tested, and those whose works do not "burn", receive a reward. Here Paul speaks of rewards that all the saved receive after they make it to heaven.