Why do you ask? The 'they' of verse 20:
'have escaped the corruption of the world by knowing our Lord and Saviour Jesus Christ and are again entangled in it and overcome, they are worse off at the end than they were at the beginning.'
2 Peter 3:17,18
Therefore, dear friends, since you already know this, be on your guard so that you may not be carried away by the error of lawless men and fall from your secure position. But grow in the grace and knowledge of our Lord and Saviour Jesus Christ. To him be glory both now and forever! Amen.
Who has escaped the corruption of the world, knowing Jesus? This can only be the regenerate. The unregenerate haven't escaped this corruption, and certainly do not know Jesus.
I'm not sure which translation is been used by the OP but the NASB renders 2 Peter 3:17-18 a bit different.
17 You therefore, beloved, knowing this beforehand, be on your guard so that you are not carried away by the error of unprincipled men and fall from your own steadfastness, 18 but grow in the grace and knowledge of our Lord and Savior Jesus Christ. To Him
be the glory, both now and to the day of eternity. Amen.
1. The word στηριγμοῦdoes not mean secure position but steadfastness.
2. The word "secure" does not appear in the original Greek.
3. This verse is not talking about salvation.
Regarding 2 Peter 2:20-21, verse 22 tells us which proverb apply to them. Dogs are not Christians. Secondly, the whole of chapter two is about false prophets and false teachers. These are the ones that did things in the name of Jesus but Jesus will tell them, "I do not know you".