OP, I'm not sure what you're doing with the ##p## and the ##A##, so let's go back to basics:
Suppose ##A## is a scalar and ##T_{ij}## is a two-index tensor. Consider ##(AT_{ij})_{,k}##. (Later we will set ##T_{ij}=\delta_{ij}## and ##k=j##.) Then, using the product rule for derivatives, we have ##(AT_{ij})_{,k}=A_{,k}T_{ij}+A(T_{ij})_{,k}##. (As a side comment, the standard notation would be to write ##T_{ij,k}## instead of ##(T_{ij})_{,k}##.)
In the case of interest, we have ##T_{ij}=\delta_{ij}##. This is constant, and so its derivatives vanish: ##(\delta_{ij})_{,k}=0##. We are left with ##(A\delta_{ij})_{,k}=A_{,k}\delta_{ij}##.
Now let ##k=j##, with an implicit sum over the repeated ##j## index. Then we have ##(A\delta_{ij})_{,j}=A_{,j}\delta_{ij}##. We can perform the sum over ##j## using the general rule given by Orodruin: ##A_{,j}\delta_{ij}=A_{,i}##. So the final result is ##(A\delta_{ij})_{,j}=A_{,i}##.
Now you can set ##i## to a particular value (1, 2, or 3) if you like.