You'll have to sort the groups by size: largest to smallest. The larger groups will always be better to find their maximum window sum first. For example, if you had groups of sizes [2,3] and a pricing chart of [9,9,2,1,9,9], then if you did the group of two first, your algorithm may give you [{9,9},2,1,9,9]. This would force your group of 3 to go into the less profitable spot.
Once you have your groups sorted, you're going to have to keep track of each groups' seating placement. That way, you can check to make sure you're not trying to place a group in preoccupied seats and skip ahead of those taken seats if so.
Additionally, you'll want to keep track of each window's profit, so you can tally it up afterward.
I've written working code for this problem, and I needed a 3-layer nested loop, so I recommend helpful variable names (not just i, j, and k).
Edit: Additionally, like user said in the comments, make sure to eliminate any placements that do not leave enough room for the other groups.