Charging 24V battery from 12V-24V converter
You need to add more detail but I will say that this will probably not work. I'm going to assume that your batteries are 12V lead-acid batteries, please edit your question if that is not correct.

To properly charge a 12V lead-acid battery you need a charging voltage of at least 13.8V and something like 14.4V is better. So, you would need a charging voltage of about 28V to 30V. If your 12V-24V converter really supplies 24V then it will not be able to charge the batteries.

It's worth mentioning that you need to be careful when charging batteries in series like this. A fault in one of the cells can cause all of the other cells to be overcharged and destroyed.