We show unusual cooperative two-photon resonance between two-modes of field inside a photonic crystal cavity. The two-photon resonance occurs when two off resonant quantum dots emit one photon in each cavity mode and de-excite simultaneously. In the presence of phonon coupling the conditions for two-photon resonance change significantly. Using such two-photon two-mode interaction we propose to generate entangled state of two qutrits. The basis of a qutrit are formed by the state of the cavity mode containing $0$, $1$ and $2$ photons. We also discuss effect of phonon coupling on negativity of the generated entangled state.