As a prisoner of war in Egypt you

would contract your services with a master in your new culture
would turn around and serve as a soldier for your new master
would be able to barter your freedom
could move up the social ladder