Can the Hamiltonian operator act on a bra, if it was once acting on a ket? I was watching a MIT Quantum Physics III class when I got a doubt about a specific bra-ket manipulation. My doubt is about the step from the expression $(3.7)$ to the expression $(3.8)$ of the lecture notes (you can also watch the step from the instant 3:05 of the video lecture ). 
The following holds:
$$H(t)|\psi_n(t)\rangle=E_n(t)|\psi_n(t)\rangle$$
The step in question is:

$$\dot{H}(t)|\psi_n(t)\rangle+H(t)|\dot{\psi}_n(t)\rangle=\dot{E}_n(t)|\psi_n(t)\rangle+E_n(t)|\dot{\psi}_n(t)\rangle\Leftrightarrow$$
$$\Leftrightarrow\langle\psi_k(t)|\dot{H}(t)|\psi_n(t)\rangle+E_k(t)\langle\psi_k(t)|\dot{\psi}_n(t)\rangle=E_n\langle\psi_k(t)|\dot{\psi}_n(t)\rangle$$

The second equation was obtained by a multiplication of the the first equation by $\langle\psi_k(t)|$, with $k\neq n$. My doubt is how does the $H(t)$ operator that was acting on $|\dot{\psi}_n(t)\rangle$ in the first equation, suddenly acts on $\langle\psi_k(t)|$ in the second equation, resulting in $\langle\psi_k(t)|\dot{\psi}_n(t)\rangle$? The $H(t)$ operator involves differentiation. The ket $|\dot{\psi}_n(t)\rangle$ was being differentiated, and for some reason, $\langle\psi_k(t)|$ is now the one that is being differentiated. Is this a legal operation?
 A: Yes, it is legal.
To give some motivation of why this sort of integral-of-a-derivative operator might simplify in the way that you are considering, let's consider a very simple example far away from our normal concerns of normalizing wavefunctions and making sure things are Hermitian: Suppose your operator is $\partial_x$ and your bra is $x^2$, and we ignore the fact that things can be complex-valued for the moment: then acting on some arbitrary $f$ we are writing the left hand side as a shorthand for the right hand side in:$$\langle x^2\rvert\partial_x\lvert f\rangle = \int_{-\infty}^\infty dx~x^2 f'(x).$$ But of course after integrating by parts we would have, $$
\begin{align}
\langle x^2\rvert\partial_x\lvert f\rangle &= \left[x^2 f(x)\right]_{-\infty}^\infty -\int_{-\infty}^\infty dx~2x f(x) \\
&= \langle -2x\rvert f\rangle,
\end{align}
$$
assuming appropriate decay properties of $f$ at infinity to remove the boundary term. So an integral-of-derivatives can sometimes be coerced into an equivalent plain integral. And you can also see that we have something that almost looks like the derivative of the left hand side, but has a frustrating minus sign.
The specific property that we are targeting here is the Hermitian or self-adjoint property which says that $H = H^\dagger$, or in mathematician's notation that $$\langle H \phi, \psi\rangle = \langle \phi, H \psi\rangle.$$This is not a trivial property and above we saw that just $\partial_x$ by itself does not satisfy this property; it satisfies a related property where it is called anti-self-adjoint or skew-Hermitian or so, $\nabla^\dagger = -\nabla.$ You may already know that $p$ as an operator does, which means that $i \partial_x$ has this property when we are careful with our negatives, because the negative sign gets absorbed into the complex conjugate operation: $$
\begin{align}
\langle \phi|i\partial_x|\psi\rangle &= \int dx~\phi^*(x)~i\partial_x~\psi(x)
\\&= i[\phi^* \psi] - \int dx~\psi(x)~i\partial_x\phi^*(x)
\\&= +\int dx~\psi(x)~ (i \partial_x \phi(x))^*
\\&= \langle i\partial_x\phi|\psi\rangle.
\end{align}
$$
(This is a little more easy to see in mathematicians’ notation, $\langle \phi, i\nabla\psi\rangle = i\langle\phi,\nabla\psi\rangle =i\langle-\nabla\phi,\psi\rangle$ by what we just proved and then the rest is just $ =\langle-(-i)\nabla\phi, \psi\rangle = \langle i\nabla\phi,\psi\rangle.$ As a corollary, any anti-self-adjoint operator can be made self-adjoint by multiplying by $\pm i$ and vice versa.)
The reason that we care about this property is that in quantum mechanics we want all of our predictions to be expectation values of the form $$\langle A\rangle_\psi = \langle \psi| A|\psi\rangle.$$ Taking the complex conjugate and remembering that $\big(\langle a | b | c\rangle\big)^* = \langle c|b^\dagger |a\rangle$ we find that the complex conjugate of this expression is
$$\langle A\rangle_\psi^* = \langle \psi|A^\dagger|\psi\rangle,$$
and so if we want a real-valued observable whose predictions always equal its complex conjugate no matter what the state is, we need to require that such an observable is self-adjoint.
The rules about the adjoints of operators are very simple, $(AB)^\dagger = B^\dagger A^\dagger$ and $(A + B)^\dagger = A^\dagger + B^\dagger$, so that you can take products of self-adjoint operators to get new self-adjoint operators only if the two commute, and you can take arbitrary sums of self-adjoint operators. Thus your typical single-particle Hamiltonian $H = -(\hbar^2/2m) \nabla^2 + U(\vec r)$, is manifestly self-adjoint because clearly $-\nabla^2$ is the product of two self-adjoint operators $(i\nabla)\cdot(i\nabla)$ and every operator commutes with itself, plus $U(x)$ is obviously self-adjoint, and finally the sum is self-adjoint.
These properties are what allow us to so confidently assert that $\langle \psi_k|H = E_k \langle \psi_k|,$ we know that $H|\psi_k\rangle = E_k|\psi_k\rangle$ on the right hand side, but since $H$ is self-adjoint we know that we can also apply it to the left-hand side just as well, to get a real number $E_k$.
A: The full derivation is as follows:
$\dot{H}(t)|\psi_n(t)\rangle+H(t)|\dot{\psi}_n(t)\rangle=\dot{E}_n(t)|\psi_n(t)\rangle+E_n(t)|\dot{\psi}_n(t)\rangle\\
\Leftrightarrow \langle\psi_k(t)|\dot{H}(t)|\psi_n(t)\rangle + \langle\psi_k(t)|H(t)|\dot{\psi}_n(t)\rangle = \langle\psi_k(t)|\dot{E}_n(t)|\psi_n(t)\rangle + \langle\psi_k(t)|E_n(t)|\dot{\psi}_n(t)\rangle \\
\Leftrightarrow \langle\psi_k(t)|\dot{H}(t)|\psi_n(t)\rangle + E_k(t)\langle\psi_k(t)|\dot{\psi}_n(t)\rangle = \dot{E}_n(t)\langle\psi_k(t)|\psi_n(t)\rangle + E_n(t)\langle\psi_k(t)|\dot{\psi}_n(t)\rangle \\
\Leftrightarrow\langle\psi_k(t)|\dot{H}(t)|\psi_n(t)\rangle + E_k(t)\langle\psi_k(t)|\dot{\psi}_n(t)\rangle=E_n(t)\langle\psi_k(t)|\dot{\psi}_n(t)\rangle$
where we replace $\langle\psi_k(t)|H(t)$ with $E_k(t)\langle\psi_k(t)|$ and $\dot{E}_n(t)\langle\psi_k(t)|\psi_n(t)\rangle =0$ because $k \ne n$ so eigenvectors $|\psi_k(t)\rangle$ and $|\psi_n(t)\rangle$ are orthogonal.
Remember that $E_n(t)$ and $E_k(t)$ are eigenvalues i.e. real numbers, so they commute with $\langle\psi_k(t)|$, and they are equal to their complex conjugates.
In the first term $\dot H(t)$ operates on the ket vector $|\psi_n(t)\rangle$ to produce another ket vector $\dot{H}(t)|\psi_n(t)\rangle$. We then take the inner product of this with the bra vector $\langle\psi_k(t)|$.
