Well, you've got a little prep work to do and some math. Fortunately they're both easy, 1 is just time consuming.
Step 1 is to charge each of your "new-to-you" batteries with an independent charger and make sure they hold voltage. If they're FLA you're probably going to need to add water and I recommend the Arrowhead Distilled water over the generic house brand.
Step 2, while the batteries are charging, is to do the math. 5kw inverter / 48v = 104a, most inverters are about 85% efficient so multiply that 104 * 1.15 and you get 120a. Add 20% for avoiding the bogus trips and that gets you 120 * 1.2 = 143.75a which doesn't exist, call it a 150a fuse to your inverter.
Now comes in the executive decision on how much paranoia you want to factor in. With 22 batteries that's going to be 5 banks @ 48v and a couple spares. When I designed my system and my neighbor's systems I went with a worst-case-scenario of only running on 1 bank because the racoons and the squirrels might get into a gang war in my utility room and blow holes in my batteries, so I fused and wired each bank so it could run the entire system if it had to. With the 4 banks in my cabin I could have done 1/4 the fuse size on each battery bank, but then I might pop fuses if I was under heavy load and had a bank or 2 down.
In your case, with 5 banks you could use 5x 30a fuses, 1 on each bank, or 5x 60a fuses in case 2 banks go offline for any reason, or any combination thereof. Either way, mount a 150a unit between your bus blocks and the inverter itself. Personally, because I'm paranoid like that, I'd go with the wire and fuses to assume 1 bank operation. But that's me and I'm a little crazy.
Step 3: Measure your fully charged batteries with a meter and hydrometer and make your bank sets. Connect and mount a fuse, then connect to the bus block and continue on.
For that price I'm not holding my breath that all of them are in a very good working order. If you had access to the special tester equipment for deep cycle batteries or had the curiosity to rig up a known load draw and a stop watch then you could load test each battery. Just remember to stop the test at 12.1v max, 12.5 to be safe.