It takes 8 days for A and B to complete a project together. If B works alone, it takes 12 days to complete. The two start to cooperate for a period of time. B leaves and has another task. The genius completed the task, how many days did the two work together?
一项工程，甲、乙两人合作需要8天完成，如果乙独做，需12天完成，两人开始合作一段时间，乙离开另有任务，余下的工作由甲来完成，又用了3天才完成任务，两人合作了几天？
<gadget id="calculator">1 / 8</gadget>
<output>1/8 = around 0.125</output>

<gadget id="calculator">1 / 12</gadget>
<output>1/12 = around 0.083333</output>

<gadget id="calculator">(1/8) - (1/12)</gadget>
<output>1/24 = around 0.041667</output>

<gadget id="calculator">(1/24) * 3</gadget>
<output>1/8 = around 0.125</output>

<gadget id="calculator">1 - (1/8)</gadget>
<output>7/8 = around 0.875</output>

<gadget id="calculator">(7/8) / (1/8)</gadget>
<output>7</output>

<result>7</result>