Option 2: A Before passing out the test, the teacher asked students to close their books.
<u>Before passing out the test</u> is the prepositional phrase.
A prepositional phrase has the following basic characteristics: usually begins with a preposition and ends with a noun, pronoun or gerund, functions as a unified part of speech, doesn't have a verb nor a subject.
Before is a preposition
Passing out the test is a gerund, which means that it acts as a noun in the sentence, and at the same time is the "object" of the proposition.
The whole phrase is a unified part of speech and doesn't have any verb nor subject.