So submit
"Because God gives grace to the humble, submit"
submit to God
"obey God"
Resist the devil
"Oppose the devil" or "Do not do what the devil wants"
he will flee
"he will run away"
you
Here this pronoun is plural and refers to James's audience.