We study the peculiarities of the nonstationary Casimir effect (creation of photons in cavities with moving boundaries) in the special case of two resonantly coupled modes with frequencies ω 0 and (3 + ∆)ω 0 , parametrically excited due to small amplitude oscillations of the ideal cavity wall at the frequency 2ω 0 (1 + δ) (with |δ|, |∆| ≪ 1). The effects of thermally induced oscillations in time dependences of the mean numbers of created photons and the exchange of quantum purities between the modes are discovered. Squeezing and photon distributions in each modes are calculated for initial vacuum and thermal states. A possibility of compensation of detunings is shown.