Compare the work done during dissolution of carbides
The relevant equations are: 

$\ce{Mg2C3(s) + 4 H2O (aq) -&gt; C3H4 (g) + 2Mg(OH)2 (aq)}$

$\ce{Al4C3 (s) + 12H2O(aq) -&gt; 3CH4(g) + 4Al(OH)3(aq)  }$

$\ce{CaC2(s) + 2H2O(aq) -&gt; C2H2(g) + Ca(OH)2(aq)}$

As you can see, most number of gaseous moles are released in the 2nd reaction while equal number of gaseous moles are released in the first and third reaction, therefore maximum work is done in the first reaction under same conditions of temperature and pressure. 

Note that: 

In open vessel reaction, gases expand against a constant external atmospheric pressure, thereby doing work on the surroundings , thus the work done $= P_{\text{atm}}\Delta V$ is independent of the gas's pressure and only dependent on $\Delta V$

Also, recall that Avogadro's law states: 


  For a given mass of an ideal gas, the volume and amount (moles) of the gas are directly proportional if the temperature and pressure are constant.


Hence, here,  $\Delta V$ only depends on the moles of the gas.