Using the inner product notation, the position expectation value is
\begin{align}\nonumber
\langle x \rangle
& = \langle \psi, \hat x \, \psi \rangle \\
& = \frac{1}{2} \langle \phi_1e^{-iE_1t/\hbar}+\phi_2e^{-iE_2t/\hbar} , \phi_1e^{-iE_1t/\hbar}+\phi_2e^{-iE_2t/\hbar}\rangle \\
& = \langle \phi_1, \hat x \, \phi_1\rangle + \langle \phi_2, \hat x \, \phi_2\rangle + e^{-i(E_2-E_1)t/\hbar} \langle \phi_1, \hat x \, \phi_2\rangle
+ e^{-i(E_1-E_2)t/\hbar} \langle \phi_2, \hat x \, \phi_1\rangle \\
& = \langle \phi_1, \hat x \, \phi_1\rangle + \langle \phi_2, \hat x \, \phi_2\rangle + e^{-i\omega t} \langle \phi_1, \hat x \, \phi_2\rangle
+ e^{i\omega t} \langle \phi_2, \hat x \, \phi_1\rangle
\end{align}
where
\[
\omega = (E_1-E_2)/\hbar \, .
\]
We know that
\[
\langle \phi_1,\hat x\, \phi_1\rangle = \langle \phi_2,\hat x\, \phi_2\rangle = \frac{L}{2}
\]
because the Hamiltonian eigenfunctions are either symmetric or anti-symmetric around the centre of the potential well. Using the definite integral given in the question, the cross term is
\begin{align}\nonumber
\langle \phi_1, \hat x \, \phi_2\rangle
& = \frac{1}{L} \int^L_0 dx \, x \sin\left( \frac{\pi x}{L} \right)\sin\left( \frac{2\pi x}{L} \right) \\
& = \frac{L}{\pi^2} \int^\pi_0 dy\, y \sin\left( y \right)\sin\left( 2y\right) \\
& = \frac{L}{\pi^2} \int^L_0 dy\, y \left(\cos\left( y\right)-\cos\left(3y \right) \right) \\ \nonumber
& = - \frac{L}{\pi^2} \left( \frac{1}{1^2} - \frac{1}{3^2} \right) = - \frac{8 L}{9 \pi^2} \, ,
\end{align}
with the same result for \(\langle \phi_2, \hat x \, \phi_1\rangle\). Putting these results together, we find
\[
\langle x \rangle = \frac{L}{2} - \frac{16L}{9 \pi^2} \cos(\omega t)
\]
and can identify \(A = 16L/9\pi^2\).