The correct answer is D. they are imprisoned by the people of the fair. Christian and his companion are not interested in what the merchants at the Vanity Fair have to offer them, and they cause quite a disturbance at the market. This is why they get detained, and are beaten up and locked in a cage afterwards.