"When the trumpets sounded, the army shouted, and at the sound of the trumpet, when the men gave a loud shout, the wall collapsed; so everyone charged straight in, and they took the city. They devoted the city to the Lord and destroyed with the sword every living thing in it - men and women, young and old, cattle, sheep and donkeys." NIV translation
Here, we see the ultimate in team work with everyone listening to God and doing as directed. The priests were faithful in blowing the trumpets and the army did their part with a loud shout. God did His part and the walls came down. So, why did God have the priests and the army do anything? He could have just collapsed the walls without their help. God knows that we, as people have the desire to work and He lets us work in His plan. The key is in only doing the work that He sets before us and trusting Him to do the rest.
"Joshua said to the two men who had spied out the land, 'Go into the prostitute's house and bring her out and all who belong to her, in accordance with your oath to her.' So the young men who had done the spying went in and brought out Rahab, her father and mother, her brothers and sisters and all who belonged to her. They brought out her entire family and put them in a place outside the camp of Israel." NIV translation
Rahab had been spared and her entire family with her but they were still outsiders. We see that she had convinced all of her family to be in the proper place to be saved. That reminds us that our job, as Christians, is to get the lost into a position where they can be saved. That involves telling them about sin and its consequences as well as its cure.
"Then they burned the whole city and everything it it, but they put the silver and gold and the articles of bronze and iron into the treasury of the Lord's house. But Joshua spared Rahab the prostitute, with her family and all who belonged to her, because she hid the men Joshua had sent as spies to Jericho - and she lives among the Israelites to this day." NIV translation
Everything that could be burned was and those things that could not were set apart for the Lord. Rahab would eventually marry Salmon who tradition says was one of the spies. He was a leader of the tribe of Judah and together they are listed in the line of Jesus.