That is something that people do not understand about Paul when he is talking we are not saved by works,for Paul talked a lot of people doing works of the flesh,thinking it would give them favor with God,but Paul said we are not saved by works,but it is a gift of God by Jesus Christ.
That is the starting point,confessing Jesus Christ,as Paul is not talking about works after we are saved.
Paul was sent to the Gentiles to turn them to Christ,and dealt with their false religions,and was telling them that what they believed in their religions,and the works they did,would not give them favor with God,but only by confessing Christ can they be saved,which is a gift of God.
The same as when we are saved by faith,which Paul is addressing that the only way we can be saved is by confessing Christ,having faith.
James addresses after we are saved being led of the Spirit,that we have to have works of the Spirit to have faith active in our life,and a person is justified by works,and not faith alone.
Which the Bible says quench not the Spirit,and grieve not the Holy Ghost,which if the Spirit has work for you to do,do it,or faith will not be active in your life,for a person is justified by works,and not faith alone.
Paul said we are saved by faith,so they think that he is saying by faith alone,but it is different in this case.
For Paul was addressing people that were not with Christ,that their works will not save them,but they have to confess Christ,and have faith,and that is why he did not say what James said,a person is justified by works,and not faith alone,because when they first come to Christ that does not apply,because they have not received the Spirit yet.
Paul said have faith,and confess Christ,for that is all they can have is faith,for their righteousness is as filthy rags,and there is none that does good,not one,and all are sinners,so we cannot approach God on the merit of being sinless,so we can only do it on faith alone,as well as confess Christ.
And at the time they have this faith,and confess Christ,they have not received the Spirit yet,so the faith without works is dead,cannot apply yet,for they are initially coming to Jesus in faith,and have not started doing works of the Spirit yet.
So Paul is saying that they are not saved by works,prior to Christ,in their religions,but they have to accept Christ,and faith alone can apply here,for they have not started doing works of the flesh,and faith is all they can have,and then James takes it from there when the person is saved,that faith alone is not going to cut it,but they must have works of the Spirit,to have faith active in their life.
So Paul was addressing that it can only be faith alone,for they are initially coming to Christ,not having the Spirit yet,so faith without works cannot apply,for they have not started doing works of the Spirit,and James is saying after they receive the Spirit,and are saved,then a person is justified by works,and not faith alone,for faith without works is dead.
Paul and James are talking of two situations in the person's life,Paul,not saved by works,have faith,confess Christ,and after they are saved,James picks it up,have works of the Spirit,faith active.Paul not saved by works,prior to Christ,James after being saved,works.Not saved by our own ability in the falseness of worldly religion,or what we think would be pleasing to God,and saved by being led of the Spirit,doing works.
Also Paul said a Spirit led life will not sin,we do not void out the law through faith,but we establish the law,and if you do not continue in what you started you will be cut off,work out your own salvation with fear and trembling,and he would be a castaway if he did not abstain from sin,we are not under the law means we are not breaking the law,abstaining from sin,so the law cannot touch us for prosecution.
So Paul and James are on the same page,abstain from sin,to be saved,which Paul would be saying do works of the Spirit to be saved,like James,for Paul said be led of the Spirit,and you will not sin,and if you have not the Spirit of Christ you are none of His.
Paul addresses faith when a person comes to Christ before having the Spirit,and doing works of the Spirit,and James addresses faith after a person receives the Spirit,for they have to do works of the Spirit to have faith active in their life,and quench not the Spirit,and grieve not the Holy Spirit,but do what the Spirit wants you to do.
Why do people not understand what Paul is saying,and distinguish when he is speaking of those that are in the flesh,and those that are in the Spirit,not saved by works,flesh,faith alone,initially coming to Christ before they received the Spirit,James,having the Spirit,do works,to have active faith.
Paul faith alone,not received the Spirit yet,so no works of the Spirit yet,James,received Spirit,do works,faith active.
Jesus,abstain from sin or you are not saved,by led of Spirit.Paul,abstain from sin or you are not saved,be led of Spirit.James,abstain from sin or you are not saved,be led of Spirit.They are all saying the same thing,but people do not understand what Paul is saying,and then some people think Paul is a heretic because of their misinterpreting Paul.
And if Paul says anything about us not being saved by the law,again he is speaking to us of our fleshy nature,because the flesh cannot live up to the spiritual law.
Rom 8:4 That the righteousness of the law might be fulfilled in us, who walk not after the flesh, but after the Spirit.
But by the Spirit the righteousness of the law is fulfilled in us,why,because we are not sinning,therefore we are not breaking the law,but keeping the law,which Paul said we establish the law.
Paul is called a heretic by some because they believe the misinterpretation of people concerning Paul,which if they knew the truth,they would not call Paul a heretic anymore.
People have to understand when Paul is saying something according to our fleshy attempt to be saved,and our spiritual attempt,by the Spirit,to be saved,and not confuse things,so that dear Paul will not be labeled a heretic by some people.