Only the first line is correct, as long as the AO basis is not orthogonal.
The point is: the AO $\leftrightarrow$ MO transformations of density matrices and Fock matrices require different formulas. For the Fock matrix the formulas are
\begin{align}
F_{MO} &= C^T F_{AO} C \tag{1}\\
F_{AO} &= SC F_{MO} C^TS \tag{2}
\end{align}
While for the density matrix, they are
\begin{align}
D_{MO} &= C^TS D_{AO} SC \tag{3}\\
D_{AO} &= C D_{MO} C^T \tag{4}
\end{align}
Herein $S$ is the AO overlap matrix, and $C$ is the MO coefficient matrix. The condition that MOs are orthonormal is utilized, otherwise one has to include the MO overlap matrix as well.
The reason for this difference is that, when we talk about the Fock matrix under some basis and the density matrix under some basis, we are talking about different things. The Fock matrix elements under a basis, no matter whether the basis is AO or MO, are the matrix elements of an operator, namely the Fock operator. Thus we can say, e.g. the diagonal elements of the AO Fock matrix are the energy expectation values of AOs. By contrast, for the density matrix, only the MO basis matrix elements are the matrix elements of an operator (the occupation number operator), but the AO basis matrix elements do not admit the same interpretation. We cannot say that the diagonal elements of the AO density matrix are the expectation values of the occupation numbers of AOs, because they can be larger than 2. Conceptually that explains the difference between the transformation rules of the density matrix and the Fock matrix. Actually proving the formulas is easier, by applying $FC=SC\epsilon$, $C^TSC=I$, and $D=CnC^T$ etc.