The first diagram doesn't work, since you'd have a short circuit (look at the red/blue lines near the interconnect between the two 3-cell holders - they are shorted through this interconnect).

The second diagram also doesn't work, since 5 volts is not enough to push charge through 8 cells; the voltage of the 5-volt battery would be lower than the battery pack, thus the diode will be reverse-biased.