By the product rule for differentiation:$$\frac{\partial(\hat A\psi)}{\partial x}=\left(\frac{\partial\hat A}{\partial x}\right)\psi+\hat A\left(\frac{\partial\psi}{\partial x}\right)\tag{1}$$ Where $\hat A$ is an operator and $\psi$ is a function depend on $x$ i.e. $\psi=\psi(x)$.
My question is: when $\hat A$ takes the form of momentum operator: $\hat A=\hat P=-i\hbar \frac{\partial}{\partial x}$, it looks like the product rule for differentiation no longer work (I'm not sure this statement is right or not) since the correct answer should be: $$\frac{\partial(\hat P\psi)}{\partial x}=-i\hbar\left(\frac{\partial^2}{\partial x^2}\right)\psi-i\hbar\left(\frac{\partial^2\psi}{\partial x^2}\right).$$ It doesn't equal to the answer given by $(1)$.
Another question: $$\frac{\partial(\psi\hat A)}{\partial t}=\left(\frac{\partial\psi}{\partial t}\right)\hat A+\psi\left(\frac{\partial\hat A}{\partial t}\right)\tag{2}$$ Where $\hat A$ now takes the form of $\hat A=\frac{\partial}{\partial t}$ and $\psi$ is a function depend on $t$ i.e. $\psi=\psi(t)$, then the product rule for differentiation now do works. (I'm pretty sure about this one is correct because it's a derivation from the book.)
I must have confused something. Can someone help me or give me some comments that may correct my question please?