No peter taught that we gain salvation by following his commandments through faith to the end.
Yeshua stated that “the faith of many shall wax cold.”
We meet Yeshua, through death or living to the last trump, either way, at the end. Paul taught the same.
Paul and James were also clear that only those that are doers, not just readers, will be justified.
No, first you obtain it as a gift of The God (Eph. 2:8-9), then you work it out as an occupation (Eph. 2:10, Phil. 2:12), as a son and servant.