The number np that is in question here is the number of instruction cycles required by the pipelined processor to execute the n instructions of the program. Note that the pipelined processor has to execute additional nop instructions, and their number "typically" grows linearly with the number of pipeline stages, so that with two constants (that we typically do not know), we have np = alpha1 * p + alpha2.
So, the more pipeline stages p we have, the more nop instructions, we have to execute, and that suggests that we should not have too many pipeline stages. On the other hand, the time required for a cycle shrinks with the number of pipeline stages, so that we get the formula on page 135 that may have an optimal number of pipeline stages where the runtime is minimal.