Hi Francis,
Those will not be deep cycle batteries meaning a cycle life in the dozens instead of 100s. And they likely will not have the power capability of the larger Optima, even when paralleled.
And why do you think your source is changing them out and giving them away? UPSs typically have a crappy float charger which cooks the electrolyte out of AGMs in a couple of years. Even if they are still functional when you get them, chances are they won't be for long
If they're free and you got the time to play with them, why not? But don't get your hopes up.
major