The second thing James' works speak of, is the kind that only God can perform. Such as, healings, deliverances, salvation, and the like.
Paul speaks of, works of the law, where James speaks of, works of faith.
One work you can do without God's help, and the other, you cannot.