The negative terminal of the second battery is connected to the negative terminal of the first battery in both diagrams Use wires to connect these three 12 volt batteries in such as way as to get 24 volts from the arrangement, and have the batteries last as long as you can.