See https://en.wikipedia.org/wiki/Mere_addition_paradox for the diagram, though in case the key parts of it are edited into a different form in the future, I'll provide a description here (adding appropriate numbers of my own invention, chosen to reflect the height of the bars in the diagram)
Description of diagram:
Population A might have 1000 people in it with a quality of life of 8, which we'll call Q8.
Population A+ is a combination of 1000 people at Q8 (population A) plus another 1000 people at Q4 (population A', though this population is not normally named).
Population B- is a combination of two lots of 1000 people which are both at Q7.
Population B has 2000 people at Q7.
The distinction between group B and B- is that B- keeps the two lots of 1000 people apart, which should reduce their happiness a bit as they have fewer options for friends, but we're supposed to imagine that they're equally happy whether they're kept apart (as in B-) or merged (in B).
Parfit's argument (to illustrate the paradox):
"Parfit observes that i) A+ seems no worse than A. This is because the people in A are no worse-off in A+, while the additional people who exist in A+ are better off in A+ compared to A [where they simply wouldn't exist] (if it is stipulated that their lives are good enough that living them is better than not existing)."
"Next, Parfit suggests that ii) B− seems better than A+. This is because B− has greater total and average happiness than A+."
"Then, he notes that iii) B seems equally as good as B−, as the only difference between B− and B is that the two groups in B− are merged to form one group in B."
"Together, these three comparisons entail that B is better than A. However, Parfit observes that when we directly compare A (a population with high average happiness) and B (a population with lower average happiness, but more total happiness because of its larger population), it may seem that B can be worse than A."
First of all, we need to understand why there should be an optimal population size for a given amount of available resources, and if the population grows too high, total happiness goes down rather than up. This must be the case because the happiness of a population falls to zero long before the resources per person approach zero, and if you drag people out of poverty by giving them a modest increase in resources, their happiness shoots up, so it isn't a linear relationship either. The paradox superficially appears to deny this, but it only does so by introducing a fundamental error.
The error in the argument is hidden in the allocation of resources for A. Initially, A has access only to the resources of A and not to the resources of A'. When A' is added to A to make A+, new resources are brought in at the same time.
We can see now that A with access to all the resources of A+ (but without the population A') is inferior to A+ in terms of happiness because it's failing to use all the resources available to it, whereas A with access only to the resources of A is superior to A+ in terms of happiness per unit of resources. This is the key difference which Parfit missed.
When we look at A+, we see an unfair distribution of resources, and if we fixed that by sharing things evenly for all members of A+, A+ might well end up looking like B- because so many people would be lifted out of poverty and gain greatly in happiness without dragging A down very far.
We can thus see that A+ is inferior to an adjusted A+ with a redistribution of resources to even them out, and we can see that A+ is inferior to B- and B if it lacks that even distribution of resources, or it might be on a level with B- and B if it has redistributed of resources to even them out.
B is superior to A if A has access to the resources of A' while population A'=0, but A is superior to B if it doesn't have access to those extra resources of A' when you compare A and B per unit of available resources (which B has a lot more of).
So, the paradox evaporates: A is better than B if A only has the resources of A; but B is better than A if A has access to the full resources of A+ while it fails to use the component of those resources relating to A'.
(Note: If A was to use the resources of A' as well, it might go up to Q9 and have happier people in it, but the optimum population would then be higher and so it would have to grow to maximise total happiness per unit of resources.)