Your slice of pie before the deal is (200/10000) * $300M = 6M
Your slice of pie after the deal is (200/13333) * $400M = 6M
Except that after the deal, your company has $100M more to spend, hopefully on investing in growing the business so that later on, you'll own 1.5% of much more than $400M.
This kind of thing is why management will sometimes try to steer employees away from discussions focused on percentages and toward ones focused on share prices. As an early employee who has been diluted a number of times, I certainly agree that it's more helpful to think in terms of my number of shares (which is unchanging) times a share price (announced at the time of the investment), rather than trying to compute my new percentage of the overall company value.
It was "pre-money $400M", "new investment $100M", "new investment gets 25%". Those can't all be held true.
You can change exactly one of them to remove the conflict, so it's either "pre money $300M", "new investment $133.33M", or "new investment gets 20%"
If the new people own 25% of the company, then the previous owners own 75%. That means that the new people should get one-third as many shares as previously existed (which you did correctly). But it also means that they should have to put up one-third as much money as the company was worth previously; that is, 133M, rather than the 100M you had them pay.
Your loss is your cut of the 33M loss that your company took by getting underpaid.
Let's say today I own 200 out of 10,000 shares (2%) of a company. Someone comes in and says we want to own 25% of your company and are willing to pay $100M for it. At that point (before any transactions happen) I assume that my company is worth ~$400M, and my shares are worth ~$8M ($400M * 0.02).
So the majority shareholders agree to the deal and dilute stock accordingly. Now there are 13,333 shares. The new buyer get 3,333 (25%) and I still have my 200 (now 1.5%). The company is worth that original $400M value plus the new $100M that was invested, for a total of $500M. My shares are worth ~$7.5M ($500M * 0.015).
Where did my half a million dollars of pie go?