Welcome to the Official Redemption® Message Board!
Since each battle is separate, the "end of battle" for a Prosperity played in a side battle is at the end that side battle.
That's what I'm here for.
The player of Book of Hozai would return the cards during his next discard phase. So if you play it on your opponent's turn, you get to hold on to the extra cards until the end of your own turn.