In James 2:26, the comparison of the human spirit and faith converges around their modes of operation. The spirit (Greek pneuma) may also be translated "breath." As a breathless body emits no indication of life, so fruitless faith exhibits no indication of life. The source of the life in faith is not works; rather, life in faith is the source of works (Ephesians 2:5-10).
In James 2:14, we read of one who
says/claims he has faith but has no resulting evidential works to validate his claim. That is not genuine faith, but a
bare profession of faith. So when James asks, "Can
that faith save him?" he is saying nothing against genuine faith, but only against an
empty profession of faith/dead faith.
*So James
does not teach that we are saved "by" works. His concern is to
show the reality of the faith professed by the individual (James 2:18) and demonstrate that the faith claimed (James 2:14) by the individual is genuine. Simple!