Mixing batteries like this is asking for trouble in my experience. Even if the voltage matches on paper, you're combining two separate battery banks into one series string, and they almost certainly won't have identical internal resistance, capacity, or state of charge curves.
The main issue is the BMS situation. If those two 12v batteries each have their own BMS (which they likely do if they're lithium), you're going to get conflicts when one trips before the other. The 24v pack will then be carrying the load solo momentarily, which isn't ideal either.
A few questions worth thinking about:
- Are all three batteries the same chemistry? LiFePO4 with AGM for example is a hard no
- Same capacity (Ah rating)?
- What's managing the overall bank — a separate BMS, or relying on individual battery protection?
I did something vaguely similar a while back trying to bodge a 48v system from mismatched packs and genuinely regretted it. Ended up with one bank consistently running hotter and the whole string going out of balance within weeks. Fogstar and Victron both recommend matched batteries in series for good reason.
If you're absolutely set on doing it, at minimum get a decent cell-level balancer across the whole string and monitor temperatures closely.
What's the actual end goal here — are you trying to hit a specific voltage for an inverter or charger? There might be a cleaner solution depending on what you're running. Plenty of people here have done creative things with Victron kit to work around awkward voltage requirements.