I can rip off the cover of the device, and rip the power feed going to the delivery system.
Even if I *FAIL*, I will have attempted to save both sets of people, and any ethical consequence of their deaths is not mine.
That's not "I have tried so I'm morally expunged". That's "I have killed everyone to spite a mad professor"
Still not binary but chances are ripping out power cords from behind the button panel will either make the button un-pressable or act as though the button had been pressed, in which case a binary outcome happens anyway.
Moot.
I did not make the binary choice that the madman wanted. I chose a third option, that may or may not fail. Given that the delivery system is triggered by the timer, which is in front of me, the signal to trigger the delivery system originates in the room I am standing in. I have access to the system by which that signal gets sent. I can prevent that signal from being delivered, thus the consequence of not pressing the button never happens, and the room with the 5 people in it never gets the signal to activate. The timer reaches zero, and nothing happens, because the cable leading to the control in that room is dangling in my hand.
I have sufficient internal knowledge of electronics to quickly identify if the system has a deadman's switch feature, and either hotwire the signal, (prevent an open circuit, which is what triggers the unit), or not- (the system uses a closed circuit to activate), and prevent the circuit from ever closing. I can make that determination in the time allotted, or at least, am confident that I can do so.
This will prevent the room with the one man in it from getting gassed. If the rooms gas, it is because the mad philosopher has an ace up his sleeve, and has manual activation buttons in the room he is safely sequestered in, and wants very much to see somebody, anybody, dead-- and wants to blame me for their deaths, as part of a god complex. In this circumstance, I would spit in his face, and say that HE is the one who pushed the damn button, and be done with it. I would take pleasure testifying at his trial when and if he ever gets caught.