Correct option is B
In the given passive sentence, "The gate was opened by the peon," the action of opening the gate is completed in the past.
Therefore, we need to find an active voice sentence that also shows a completed action in past.
Option (b) "The peon opened the gate" is in the simple past tense, which indicates a completed action in the past, and thus is the correct answer.