In position basis, $\psi(x_o)=\langle x_o|\psi\rangle$ where $|\psi\rangle=\int dx|x\rangle\psi(x)$
So, we have defined $\langle x_o|x\rangle=\delta(x-x_o)$
Thus, $\langle x_o|\psi\rangle=\langle x_o|\Big(\int dx|x\rangle\psi(x)\Big)=\int dx\langle x_o|x\rangle\psi(x)=\int dx\delta(x-x_o)\psi(x)=\psi(x_o)$
Now, suppose we have an operator $\hat A=\frac{d}{dx}$
$\hat A\psi(x) = \psi'(x)$
So, $\hat A\psi(x)\Big|_{x_o} = \psi'(x)\Big|_{x_o}=\psi'(x_o)$
By the definition of differentiation we get, $\psi'(x_o)=\lim\limits_{\epsilon\to 0}\frac{\psi(x_o+\epsilon)-\psi(x_o)}{\epsilon}\tag{1}$
$(1)$ can be written as $\langle x_o|\hat A\psi\rangle=\lim\limits_{\epsilon\to 0}\frac{\langle x_o+\epsilon|\psi\rangle-\langle x_o|\psi\rangle}{\epsilon}\tag{2}$
$\langle x_o|\hat A\psi\rangle=\Big(\lim\limits_{\epsilon\to 0}\frac{\langle x_o+\epsilon|-\langle x_o|
}{\epsilon}\Big)|\psi\rangle=\frac{d}{dx}\langle x_o|\psi\rangle=\hat A\langle x_o|\psi\rangle\tag{3}$
This manipulation has also been used to find the expression wavefunction in position basis as the superposition of the momentum eigenkets because $(3)$ gives us a differential equation.
I want to know in the RHS of $(3)$ whether we should have $\hat A$ or $\hat A^\dagger$. Because for the given $\hat A$ (which is not hermitian), $\hat A^{\dagger}=-\hat A$
I have tried to write $(3)$ in the form of functions instead of vectors.
$(2)$ can be written as
$\int\delta(x-x_o)\hat A\psi(x)dx = \int\delta(x-x_o)\psi'(x)dx$
Using integration by parts we get,
$\int\delta(x-x_o)\hat A\psi(x)dx = -\int\delta'(x-x_o)\psi(x)dx = \int-\hat A\Big(\delta(x-x_o)\Big)\psi(x)dx\tag{4}$
The RHS of $(3)$ suggests that $\int\delta(x-x_o)\hat A\psi(x)dx = \hat A\int\delta(x-x_o)\psi(x)dx\tag{5}$
Doubts
(i) In the RHS of $(3)$ would we have $\hat A$ or $\hat A^\dagger=-\hat A$. I feel that it would be $\hat A^\dagger$ because we are sort of transferring the derivative, but the $(3)$ suggests that it is $\hat A$.
(ii) While proving $(3)$ using the functions instead of vectors, I got stuck in $(4)$. I am not able to justify how we can take $\hat A$ out of the integral to get $(5)$.