After the power went back on and sometime between there and the third drug, the second drug was already in the IV line, despite the fact that the drug was not even injected yet.
After the first injection, the cloth covering Luis's IV is colored blue. When the second drug is injected, it is clean again.
Right before the power to the prison flickers, the anesthetic in the machine was already depleted and into Luis. However, when the power flickers, there is still shown to be some of the drug in the machine.