Imagine connecting these two cells into a circuit, with some other components. Now you'll have charges circulating throughout the circuit; and those same charges Electrons will move through the wires of the circuit. When the electrons reach the positive terminal of a cell, new electrons with more energy will appear at the negative terminal of the same cell. This happens at both cells.
As the charges move through the cells, they gain energy. Each coulomb of charge gains 10J of energy on its way throughEach electron entering the 10V cell, is replaced in the circuit by an electron with 10eV more energy; and 5J of energy on its way througheach electron entering the 5V cell is replaced by an electron with 5eV more energy. Since it gains 15J in total All these electrons are indistinguishable from one another, thisexcept for the energy that they carry. And therefore, the overall effect is equivalent to having just a single cell where each electron is replaced by an electron with 15eV more energy - that is, a 15V cell.
Those 15J15eV of energy will then be used up by whatever additional components are in the circuit, including the internal resistances of both cells.