I didn't do any math, just going off of experience building quite a lot of encounters here. If an exact calculation is what you want, leave a comment and I'll delete this answer.
Coinflip encounter
This encounter will come down to the initiatives rolled. With 13 AC and 28 hit points, neither of the swarms should live more than one attacking round from the party at level 6, even taking into account resistances. They should however take up approximately that round of attack by the players.
Which leaves the Living Spellbook, which gets a practical one round of free attacks because the players will be dealing with the swarms. If they're careless or unlucky (aka, you felt like giving them a hard time), the book will use two multiattacks on the sorcerer or artificer, who should go down fast. At that point, the combat depends on whether they were able to dispel the mage armor. If the swarms got off an attack before dying, I'd say those chances are low. Otherwise, they are high and the fight should be a breeze for the barbarian and fighter (the arcane explosion should do approximately zero against them with a Strength saving throw).
So the 2 scenarios I see happening are:
Swarms have relatively high initiative
- The swarms attack the artificer and sorcerer for about 50% of their HP
- The swarms die
- The Living Spellbook effectively takes out the artificer and sorcerer out of the fight
- Mage armor isn't dispelled, your barbarian and fighter have a hard time, but should barely win out before any deadly casualties. Bad dice rolls for the player result in a loss
Swarms have relatively low initiative
- Swarms die immediately
- Sourcerer dispels mage armor on the Living Spellbook
- Living spellbook becomes a glass cannon with 14 AC, which both the barbarian and fighter easily break
- Fight is a breeze, biggest risk is a small paper cut by one of the twirling paper sheets