What determines the outcome of a price war, and why isn't that outcome reached instantaneously?
Answer to question

If we take your assumptions literally, Jim will decide not to enter the widget business. For suppose he did incur the cost of entry and that Mary is selling at price $p_m$. Jim can only sell to consumers if his price $p_j\leq p_m$. The best price for Jim is $p_m-\epsilon$ (where $\epsilon$ is some very small, positive amount). But this would leave Mary with no sales, so she will have an incentive to reduce her price to $p_j-\epsilon$. This is the price war you describe and it will result in both parties reducing their price to marginal cost (i.e. zero—this is known as Bertrand competition).

Since there are no frictions in your model, this will all happen very quickly. Moreover, because a price of zero implies zero profits, Jim has no incentive to incur the cost of entry in the first place, so he will instead opt to stay out of the market.



Effect of relaxing assumptions

This is obviously quite a stylised result owing to the stark assumptions of the model. But it makes a good foundation for thinking about some more realistic settings. For example:


If Mary's factory has a marginal cost $c_m$ and Jim has a patent on a new technology that implies cost $c_j&lt;c_m$ then Jim can profitably set a price below the lowest price Mary is willing to set. Good news: if someone invents a more efficient technology they can enter the market and displace the older, less efficient technology.
Suppose that the factory has a monthly fixed maintenance cost. If Mary is a small, credit-constrained independent firm and Jim is a huge conglomerate with large reserves of cash then Jim can enter and practice predatory pricing. If he is patient enough, he can enter the market, set $p_j=0$, and wait for Mary to run out of money. She will then leave the market and Jim becomes a profitable monopoly. This kind of anti-competitive behaviour is illegal in most jurisdictions (yes, there are laws against setting too low a price!).
Suppose that Mary's widgets are blue and Jim's are pink. Consumers have an idiosyncratic preference for either blue or pink widgets. Then both firms can set a positive price and sell to the consumers who like their colour more. The more are products differentiated the more there is scope for both firms to exist profitably in the industry and Jim may find it worthwhile to enter. This is why firms talk so much about differentiation and unique selling points. There are various ways to model this in economics. Here is an example.




More formally, $p_j=p_m=0$ is the unique pure strategy Nash equilibrium

To be slightly more formal, let us check that $p_m=p_j=0$ is indeed a (Nash) equilibrium of the subgame in which both firms simultaneously set $p\in\mathbb{R}$ with the lowest priced firm capturing the entire (finite) demand. Neither party can profit by deviating to $p&lt;0$ as this yields negative profits. A deviation to any $p&gt;0$ results in the rival firm having a lower price so demand (and profits) are zero---again not profitable. Thus, there is no profitable deviation and $p_i=p_m=0$ is an equilibrium.

Is there another pure strategy equilibrium with some $p&gt;0$? The answer is no. Consider the three possibilities and observe how a profitable deviation can be constructed for each:


$p_m&gt;p_j$. In this case $j$ could increase his price to some $p_j'\in(p_j,p_m)$ without losing any demand. Such a $p_j'$ exists by the connectedness of the real line.
$p_m=p_j=p$. In this case at least one of the firms must be capturing less than all of the consumers. But by deviating to $p'=p-\epsilon$ it can capture all consumers. If we write $D$ for demand before the deviation and $D'&gt;D$ for demand afterwards then the change in profits is $D'(p-\epsilon)-Dp$. By the connectedness of the real line, there exists an $\epsilon$ sufficiently small that this is positive.
$p_m&lt;p_j$. This case is symmetric to $p_m&gt;p_j$.


Thus, the only pure strategy equilibrium of this one-shot game is $p_j=p_m=0$.



If we repeat the game then we can sustain other (collusive) equilibria

What if we repeat the game infinitely many times? Suppose the two firms have an implicit understanding (an explicit agreement would be illegal) that they will both set $p=p^*$ for some $p^*&gt;0$. Moreover, it is understood that if one firm deviates from this behaviour today, then both firms will revert to playing the static equilibrium ($p_j=p_m=0$) forever. Firms discount the future at rate $\delta$. For simplicity, suppose that demand is constant: $D(p)=1$ (not crucial).

If a firm plays in accordance with this understanding (and expects its rival to do likewise) then its profit is

$$\sum_{t=0}^\infty\frac{1}{2}\delta^t p^*=\frac{p^*}{2(1-\delta)}.$$

If a firm cheats and sets $p^*-\epsilon$ ($\epsilon$ small) then it captures the whole demand today, but expects to be punished forever thereafter, so profit is $p^*$. Thus, both firms wish to comply with their implicit understanding if
$$\frac{p^*}{2(1-\delta)}&gt;p^*\iff \delta&gt;\frac{1}{2}$$
(i.e. if they are sufficiently patient).

So, if we repeat the game and firms are very patient, we can sustain any price in equilibrium. But note that these equilibria require not only that firms are patient, but also that a) there is no threat of future entry that could destabilise the equilibrium; b) firms are able to coordinate on a $p^*$ without ever making an (illegal) explicit agreement; and c) firms are able to constantly and accurately monitor rivals behaviour in order to detect cheating.