The exact dynamics of a model consisting of two two-level atoms interacting with the electromagnetic field mode of an ideal resonator through degenerate Raman transitions are found for coherent and thermal field states. The exact solution is used to calculate atom-atom negativity. It is shown that for separable initial states of atoms, their interaction with the resonator field does not lead to the occurrence of atom-atom entanglement. It was found that for the Bell initial states of atoms in the case of a coherent resonator field, the effect of sudden death of entanglement takes place for large average values of the number of photons in the resonator, while in case of thermal noise, this effect is absent for any intensities of the resonator field.