The inverter will be happy, but the batteries won't. The new ones will be constantly trying to recharge the old ones and wasting mucho power, maybe ruining your nice new batteries in the process.
You need to isolate the two battery packs from each other. The simplest way is to incorporate a nice high current diode with each battery pack to allow the electricity to flow out of the batteries only.
You don't mention what you have in the way of a charging system. If the batteries are charged in place as in a UPS, then this will break that charging. A separate charge feed would need to be provided to each battery pack.
You could connect your battery string directly to the solar panel: the voltage is about right. However, your VRLA batteries are sealed, so you should never over-charge them.
Your "24V" panels probably have a peak power point around 36V, and an open circuit voltage around 48V. This is a suitable voltage range for running a "24V" power system, which actually runs at around 28V, charges at 30V, needs around 32V before losses, and needs some overhead so that it works in low-light conditions.
Running a "36V" system at about 42V, with charging around 44V, you wouldn't get very good solar efficiency out of your "24V" panel, and you wouldn't get peak charge current out of them, so they would not be 200W each (400W total) except perhaps under exceptional conditions when cold and new, running into a flat battery.
A normal charge controller can "handle" this situation, that is, it won't die, it will charge your battery, it won't overcharge your battery, it won't destroy the UPS. *Assuming the charge controller voltage levels can be configured for sealed batteries
The question is, can you "handle" the fact that you won't get 200W (each) out of your 200W (each) panels if you configure it that way?
Having said that, it's a UPS. You may never use it. You probably won't need 400W. And it's a stop-gap: your expectations don't have to be high.
Best Answer
The advantage of 48V over 24V is that only half as much current is required to get the same power. Assuming 95% converter efficiency, for 3kW output at 24V your battery wiring has to handle 132A! At 48V it drops to a more reasonable 66A. This is actually better than you might think because power loss is proportional to current squared, so if you use your existing wiring and connectors the loss in them will be 4 times higher.
A 24V inverter might be a bit cheaper, but you should consider the cost of replacing your wiring and fuses etc. You should also consider that a cheap 24V inverter might not be as reliable as a higher quality 48V unit.