Guy's.
Mixing a 40mAH cell with a 80mAH cell will not give you anymore than the lowest cell capacity, in fact when the cell with the lowest cell has been drained (40 mAH) the other cell may try to charge the now flat cell.
At best you will achieve the same as 2 x 40mAH cells.
Series Connections
When a battery is constructed from group of cells connected in series, the battery voltage is the sum of the voltages of the individual cells, but the mAH capacity is the same for the chain since the same current passes through all of the cells.
Thus a battery constructed from 2 X 1.2 Volt X 80 mAH cells will have a battery voltage of 2.4 Volts and an mAH capacity of 80 mAH.
Parallel Connections
When the same 2 cells are connected in parallel, the battery voltage is the same as the voltage of the single cells, but the mAH capacity will be the sum of the mAH capacity of the cells since the current through the load is the sum of all the currents through the individual cells.
BUT.
Batteries should not be made up from mixed cells. Do not mix cells of different ages, different sizes, different voltages, different chemistries, different capacities, different shapes or different manufacturers. Mixing cell types within a battery can lead to some cells being overloaded leading to early failure and this could be dangerous.