Commenting on James 2:18-19, William Barclay says this:
James is thinking of a possible objector who says, "Faith is a fine thing; and works are fine things. They are both perfectly genuine manifestations of real religion But the one man does not necessarily posses both. One man will have faith and another will have works. Well, then, you carry on with your works and I will carry on with my faith; and we are both being truly religious in our own way."
The objector's view is that faith and works are alternative expressions of the Christian religion. James will have none of it. It is not a case of either faith or works; it is necessarily a case of both faith and works.