The answer to this can be found in Chapter 6. Specifically, it starts on p. 111 in the paperback version of the book and ends on p. 112. Diamond’s argument can be summed up when he says
A fourth factor was the two-way link between the rise in human population density and the rise in food production.
What that means is that neither was the cause or the effect. They were both causes and they were both effects.
Diamond says that human populations were already rising in the late Pleistocene, even before agriculture arose. He says that this happened because people were getting better technology for “collecting and processing wild foods.” This meant that even hunter-gatherers could get more food and support more people.
The rising population densities meant that more food was needed. This meant that it was more beneficial to start farming because farming “yields more edible calories per acre than does hunting-gathering.” In other words, if societies had more people, they needed to farm. To that extent, at least, higher populations were the cause and farming was the effect.
But the relationship ran the other way as well. As farming increased, people had more food. They were also living sedentary lifestyles. This meant that any one woman could have babies closer together in time the population could grow. It meant that there was more food available to feed the larger populations. This means that farming was the cause and population growth was the effect.
Thus, we can see that both of these were causes and both were effects.