In the end, the people sold their farms to Joseph who was working for the king of Egypt. The hard times forced all the people to sell their land and become the King's slaves.