How can 24 V (two 12 V batteries) x 100 A power a 5 kVA (or 4000 W) inverter?
The 100 Ampere Hour rating on the battery is a capacity specification, not a maximum current specification. In order to run an inverter that puts out 240 VAC at 16 Amps, you need to pull about 340 Amps on the 24 Volt side. This actually isn't unreasonable but only for a short period of time. In a case like that, you'll get roughly 15 minutes of power. On a lead acid car battery they may have an Ampere hour rating of 100 AH but a cold cranking ampere rating of 750 Amps. This means that the battery can deliver up to 750 Amps for short periods (30 seconds).