If you type:
2 n1 p[n1-1, n2] /. {n1 - 1 -> z1}
then the answer is:
2 n1 p[z1, n2]
This is shorthand for the function:
ReplaceAll[2 n1 p[n1 - 1, n2], n1 - 1 -> z1]
which explicitly uses the rule (in the second argument) to change the first argumemnt.