The newcomer first eats up the experienced person's time
Suppose an experienced worker can do 10 units of work a day. Training a newcomer takes up one whole day of their time, and from the second day the newcomer can do 5 units a day. With only 2 days left, the experienced worker does 10 fewer units and the newcomer makes up only 5, a net loss of 5. With 3 days left, the newcomer makes up 10, exactly breaking even. With 10 days left, the newcomer makes up 45, a net gain of 35. The closer the deadline, the more adding people costs you.
More people, more pairs to keep in sync
Every two people on a team have to keep each other informed, and that counts as one pair. The number of pairs among n people is:
2n(n−1)
Each person has to keep in sync with the other n−1 people, and each pair gets counted once from each end, so you divide by 2. Among 3 people there are 3 pairs; among 6 there are 15. Double the people, and the pairs more than double. The more the work a newcomer takes on touches other people's changes, the more interfaces the experienced people have to explain, the more conflicts they have to sort out, and the more things they have to test again.
The delivery date is set by the line that finishes last
Some work has to happen in order. Until the design is settled, the people writing code have to wait; until the whole thing passes testing, it can't be delivered. The chain of linked work like this that finishes last is that line. When a newcomer arrives, first ask which piece of work on this line they can take over. If they can't take any, no number of new people will change the date.
Adding people helps when the work holding up delivery can be split into pieces that don't affect each other, the newcomers know this kind of work, and there's enough time left to earn back the cost: tickets with clear rules, for instance, or drafts proofread separately. An expert who needs no training and can fix a critical fault directly can also bring delivery forward. So it isn't a rule against ever adding people. What to guard against is putting people who need a lot of training into tightly linked work close to a deadline.