582. Misdirected Labors
Shabbos 1:10
If a person had two candles in front of him, either both burning or both extinguished, and he intended to light or extinguish one but instead he ended up lighting or extinguishing the other, he is liable because he performed the labor that he intended. This is like a person who intended to pick one fig but picked a different fig, or a person who intended to kill one victim but killed a different victim instead. One is liable in such a case because he performed the labor that he intended to perform.
Shabbos 1:11
Let’s say that he had two candles, one lit and one extinguished. If he intended first to light the one that was extinguished and then to extinguish the one that was lit but he ended up extinguishing the lit candle first and then lighting the extinguished candle, he is not liable. If he accomplished both acts in a single breath, he is liable. Even though he did not light the first candle before extinguishing the second, he did not delay and he performed both actions simultaneously so he is liable. This is true in similar cases. If one performs an act of labor without intention, he is not liable.