That's a simpler way to look at it. In reality, there'd be more stuff like this:
M = Monthly Operating Cost
F1, F2, F3... = Freelance/other costs of Book 1, 2, 3...
C1, C2, C3... = Cost of 5,000 copies of Book 1, 2, 3...
R1, R2, R3... = Total Sales of Book 1, 2, 3...
Let's say, for the sake of argument, M is going to be about (~35 employees @$40,000/yr, Office space @ $5,000/month, 5,000 sq ft @ $1.25/foot/month) round down a lot $125,000.
The cost to Freelancers and Artists to complete a book is usually between $0.10 and $1.00 per word, illustrators usually average around $200 a book. So, taking 30 Nights as an example, and say we're paying the authors $0.20 a word (which is closer to the game book average from what I've heard): 11 illustrators - $2200, ~90,000 words - $18,000, about $20,000 to pay the help.
Now, I have no idea how much book manufacturers charge for books (there's a difference between manufacturers and printers. Printers usually top out print runs around 2,000 copies). but I believe the MSRP for 30 Nights was aroun $39.99. If they printed 5,000 copies, they were hoping to gross $200,000. Printers nowadays also help by, for a fee, producing your PDF to go along with the book. Oh wait, you thought the gaming companies made the PDFs and sent them to the printer? No, the printers make the PDFs to make sure the files match what is being printed exactly. The PDF goes back and forth from Catalyst and the Printer until everyone is happy with the layout and design, then it's locked in and the print run can start. Smaller, POD companies charge about $20 a book for full color, glossy pages that are 8 1/2 x 11. For 5,000, books, that would be a whopping $100,000. Bigger print manufacturers will give them a deal. Let's say, for this experiment, they offer to do the PDF and Print Run for $50,000 for 5,000 copies.
Now, the book goes for $39.99 in the bookstore, the PDF goes for $19.99. On DriveThruRPG, it's an Electrum seller, meaning between 250-500 copies. Let's say about 250 sold on DTRPG and another straight from Catalyst Store, total of about 500. It was released in March, so I'll say 80% of the sales were then, or about 400 copies. So, they brought in about $8,000 from pdf sales in the first month, with $2,000 in the 4 months since it released.
On the print side, I have no estimate on how many sold, but for fun, let's say they sold 4,000 hard copies, since it was a popular plot book. That would bring in $160,000 revenue for that book. Again, most of the sales will be in the first month, so let's break it down to $150,000 in the first month, $10,000 in the four months since release.
So, we have M = $125,000, F1 = $18,000, C1 = $50,000 and R1 = $158,000. Add in revenue from other books that didn't release this month, Rx = ~$12,000 per book, let's give them 6 books, so $72,000.
Total Revenue for the month is about $230,000 minus total costs for the month of $193,000 and you've got a profit of about $37,000 for one successful print run in the month. Hopefully you have one every month, since in months where you don't produce a book, you still have $125,000 monthly costs.
Now for the fun part. Let's say that the PDF is gotten back from the printer and some unscrupulous person dumps it on Reddit right as you find out that the print run won't be available for another six months due to shipping problems. To stem the tide of loss from the pirated copy, you release the PDF early.
The monthly costs are all still the same, but now you're revenue turns into only the $8,000 for the first month and, since you dropped the PDF much earlier than the print book, it's not as popular a release (most likely due to word of mouth about editing mistakes, how they nerfed armor, or some other factors). So the physical book releases, you've already paid for 5,000 books, but only sell about 1,000 since everyone is "waiting for the errata to be integrated" in the second printing (which would cost another $50,000 in our example). Revenue from the physical books are now only $40,000.
Total Revenue is $51,000 ($40K for Print, $11K for 6 months of PDF sales) for the book in the first month of physical release, but you still have $230,000 in monthly costs. Which, after six months is $1,380,000.
Now, this is all hypothetical and using a lot of guessing and estimates based on information found on the web. Their monthly costs aren't probably that high, but even taking out office space and bring it down to 15 employees, you still have $675,000/year or about $56,000/month (which is $107,000 profit on the print run of a successful book, and they are still hurting in the second example).