You opened the doors. The PSA Agents came in. Then, you imprisoned them. Before the Witch could turn them into dust, you quickly put the Witch in the remaining cage and used the key to unlock the cages containing the agents. You then walked to the PSA HQ while Lydia made a giant spaceship that will destroy Earth.