Complex sentence: Sam is allowed to ask three questions in regard to the Devil's powers, and then pose either a question or a task; if the demon cannot answer said question or perform said task, Sam's soul is spared.
Split into simpler sentences: Sam is allowed to ask three questions in regard to the Devil's powers and then pose either a question or a task. If the demon cannot answer the question or perform the task, Sam's soul is spared.