Answer
The fact that you've already sunk $5 million isn't relevant to your decision anymore, since that money is gone. What matters now is the chance to earn profits at the margin. If you spend another $1 million and can generate sales of $3 million, you'll earn $2 million in marginal profit, so you should do so. You are right to think that the project has lost a total of $3 million ($6 million in costs and only $3 million in revenue) and you shouldn't have started it. That's true, but if you don't spend the additional $1 million, you won't have any sales and your losses will be $5 million. So what matters is not the total profit, but the profit you can earn at the margin. In fact, you'd pay up to $3 million to complete development; any more than that, and you won't be increasing profit at the margin.
Work Step by Step
.