I underestimated myself; I wrote a solution to the puzzle at the same time.
Obviously, any genocide is monstrous and unthinkable, but I am doing philosophy, and so the task is to solve the problem on own utilitarian terms.
In the previous post the "puzzle" is that utilitarianism seems to sanction or even mandate genocide. Yet utilitarianism is a respectable moral theory. So, what goes wrong? Here are several suggestions:
1. Rule utilitarianism may not permit it, and that genocide of "inferior" people is legitimate is a dangerous rule. It is a distinct possibility that the people of Ruritania may themselves split into hostile groups (such as the redheads and the redheads-haters), such that it will be demanded that one group ("we") exterminate the other ("them"), too. Logically, this process of mutual slaughter need not stop until only one person remains.
2. In particular, the rule that the smart can rightfully kill the stupid is easily generalized into the permission or even duty for smart Ruritanians to kill stupid Ruritanians. This is ominous, as it entails also that the smartest Ruritanian has the right to liquidate everyone else in Ruritania.
3. The philosopher neglects the law of comparative advantage / association. On the free market the "strong" or "smart" do not prey on the "weak" and "stupid"; the strong will benefit from dividing labor with the weak even if he is better that the weak at all the tasks being divided.
4. Violence need not be involved in the process of colonizing Waldavia. If the land and resources are unowned, as they would likely be with only hunters-gatherers inhabiting Waldavia, then Ruritanian businessmen can exploit its land without asking anyone's permission. If they are owned, then they can be bought from the Waldavian tribes, possibly cheaply, and again developed without violating anyone's rights to life and property. And, once again, killing to steal is a bad and decivilizing rule, as it habituates the aggressors to do the same with their fellow Ruritanians, as well. In fact, it is likely that the Ruritanians have achieved their level of civilization precisely by scrupulously adhering to universal moral laws. If they had been predatory, then they would not be "smart" even regarding their narrow self-interest as the puzzle postulates.
5. Whose welfare do we care for? Utilitarianism takes the scope and intensity of benevolence as a given. Whatever the group (which may be everyone in the world) we love and will good to, (rule) utilitarianism recommends institutions, practices, character traits that will maximize general happiness over that group. It may thus be objected to the philosopher's argument that we value the happiness of the present occupants of Waldavia, as well. Hence killing them will be contrary to his own moral theory.
Moreover, if Smith loves Jones and vice versa, then their wills intertwine, and they enjoy spiritual union and mutual indwelling. They are able to feel other other's happiness. Therefore, utilitarianism may recommend charity as increasing the joy of the lovers. But the Ruritanians are immediately prevented from doing harm to the Waldavians by their charity to them.
6. If the Waldavians really are stupid, then they will enjoy lessened income in the integrated Ruritania-Waldavia economy. (Though the Waldavians will still benefit tremendously from being part of international social cooperation.) Therefore, given also their small numbers, their claim on the social resources will be vanishingly small.
Moreover, as long as the Waldavians are not put on any welfare but make a living honestly, they will be able to "afford" fewer children than the more capable Ruritanians. At the same time, the smarter Waldavians will have a greater incentive to procreate. The tendency in the market economy is toward genetic enrichment or luxuriation of the populace.
Thus, in the short term, the market economy will naturally assign to the Waldavians a lower place in the social hierarchy, such that they may be quite invisible to the average Ruritanian in the course of daily life; and in the long term, for the present generation's great-grandchildren, there may occur a convergence between the Ruritanians and Waldavians in terms of IQ and other desirable traits. There is therefore no need to wipe out the Waldavians even from the Ruritanian philosopher's point of view.
7. In general, we can't create a better world by killing X who is "stupid" and have some couple create child Y who is "smart." Consider the following scenario: suppose you have a kid who is, say, 15 years old or even a pet cat you've had for a while; and let someone offer you a deal: he will kill your child or your cat and give you instead a better (in some sense) one. Would you accept? Of course not! You love that child, that cat for what they are. They are genuinely irreplaceable. So, we cannot start killing people we love to replace them with better versions of themselves. That would devalue our love, substituting for it a kind of eugenics program, wherein we do not value people for their own sake nor think of them as subjects but seek to satisfy some aesthetic view of society, e.g., by allowing only "beautiful people" to live, thinking of people as mere objects, means to ends.
8. It may happen at some point that the human population will reach an optimal level, defined as the number of people at which a new child somehow costs society as much happiness as the child himself will enjoy. Either increasing or decreasing the population would yield less overall utility. But that limit has not been reached and will not be reached for a long time (if ever), given our commitment to freedom and capitalism.