Expectation Values and Derivation of Heisenberg Equation? 
Consider a system of particles with wave function $\psi$(x) (x can be understood to stand for all degrees of freedom of the system; so, if we have a system of two particles then x should represent {$x_1; y_1; z_1; x_2; y_2; z_2$}). The expectation value of an operator $\hat{A}$ that operates on is defined by :
$$\langle\hat{A}\rangle = \int\psi^{*}\hat{A}\psi dx$$

Yup this makes sense to me and there's nothing new here.

If $\psi$ is an eigenfunction of $\hat{A}$ with eigenvalue $a$, then, assuming the wave function to be normalized, we have :
$$⟨ \hat{A}  ⟩ = a$$

This is where I want to confirm something.
$$\hat{A}\psi = a\psi$$
Hence,
$$⟨ \hat{A}  ⟩ =\int\psi^{*} a \psi dx$$
Since $a$ is a constant I can take it out :
$$\langle\hat{A}\rangle = a \int\psi^{*} \psi dx$$
We assumed that the wave function was normalized hence
$$\int\psi^{*} \psi dx = 1$$
Leaving
$$\langle\hat{A}\rangle = a$$

Now consider the rate of change of the expectation value of $\langle\hat{A}\rangle$:
$$\frac{d\langle\hat{A}\rangle}{dt} = \int{\frac{\partial}{\partial t}}(\psi^{*}\hat{A}\psi)dx$$
$$=\int{\frac{\partial \psi^{*}}{\partial t}\hat{A}\psi+\psi^{}\frac{\partial\hat{A}}{\partial t}\psi^{*}}+\frac{\partial \psi}{\partial t}\hat{A}\psi^{*} dx$$
$$=\int{\langle\frac{\partial\hat{A}}{\partial t}\rangle} +\frac{i}{\hbar}\int{[(\hat{H}\psi)^{*}\hat{A}\psi-\psi^{*}\hat{A}\hat{H}\psi]}dx$$
where we have used the Schrodinger equation :
$$i\hbar\frac{\partial \psi}{\partial t} = \hat{H}\psi$$

The second line is easily obtained via differentiation. The second term in the second line corresponds to the first term in the third line, correct ?
I do not see how this term was obtained. In particular where the $\frac{i}{\hbar}$ originates from :
$$\frac{i}{\hbar}\int{[(\hat{H}\psi)^{*}\hat{A}\psi-\psi^{*}\hat{A}\hat{H}\psi]}$$
Please help me.
PS : Take it easy on me. QM in general is quite new to me.
 A: They have used the Schrödinger equation:
$$i\hbar\frac{\partial \psi}{\partial t} = \hat{H} \psi$$
And hence:
$$\frac{\partial \psi}{\partial t} = \frac{1}{i\hbar}\hat{H}\psi$$
And since $1/i = -i$:
$$\frac{\partial \psi}{\partial t} = -\frac{i}{\hbar}\hat{H}\psi$$
Similarly for $\psi^*$ we take the complex conjugate:
$$\frac{\partial \psi^*}{\partial t} = \frac{i}{\hbar}(\hat{H}\psi)^*$$
Plugging these values into the integral gives us the last line you were confused about.
A: From the Schroedinger equation,
$$i\hbar\frac{\partial\psi}{\partial t}=\hat{H}\psi$$
simply divide by $i\hbar$:
$$\frac{\partial\psi}{\partial t}=\frac{1}{i\hbar}\hat{H}\psi=-\frac{i}{\hbar}\hat{H}\psi\\$$
where we used
$$
\frac{1}{i}\cdot\frac{i}{i}=\frac{i}{i^2}=\frac{i}{-1}=-i
$$
Now note that you've incorrectly applied the derivative. In quantum mechanics, $\hat{A}$ is an operator and acts on objects to the right: $\hat{H}\psi=E\psi$. That is to say, order matters: $\psi^*\hat{A}\psi$ is not necessarily the same as $\psi\hat{A}\psi^*$.
As such, the line becomes
$$\frac{\partial \psi^*}{\partial t}\hat{A}\psi+\psi^*\frac{\partial\hat{A}}{\partial t}\psi+\psi^*\hat{A}\frac{\partial \psi}{\partial t} $$
(obviously ignoring the integral). This can be rearranged to give you the line you expected:
$$\psi^*\frac{\partial\hat{A}}{\partial t}\psi+\frac{\partial \psi^*}{\partial t}\hat{A}\psi+\psi^*\hat{A}\frac{\partial \psi}{\partial t} $$
So that first term is indeed the middle term of the previous line. The remaining two terms use the Schroedinger equation
$$\frac{\partial \psi^*}{\partial t}\hat{A}\psi+\psi^*\hat{A}\frac{\partial \psi}{\partial t} =\left(-\frac i\hbar\hat{H}\psi\right)^*\hat{A}\psi+\psi^*\hat{A}\left(-\frac{i}{\hbar}\hat{H}\psi\right)$$
This should reduce to your solution (though I think the minus signs are different).
A: To arrive at the 2nd term of the third line, they have simply employed the SE equation,
$$i\hbar\frac{\partial \psi}{\partial t} = \hat{H}\psi$$
Re-arranging the above equation gives:
$$\frac{\partial \psi}{\partial t} = -\frac{i}{\hbar}\hat{H}\psi$$
Therefore by replacing $\frac{\partial \psi}{\partial t}$ in the second line with $-\frac{i}{\hbar}\hat{H}\psi$, you will arrive at the 3rd line without too much trouble.
