We study the effect of population inversion associated with the electron and hole injection in graphene p-i-n structures at the room and slightly lower temperatures. It is assumed that the recombination and energy relaxation of electrons and holes are associated primarily with the interband and intraband processes assisted by optical phonons. The dependences of the electron-hole and optical phonon effective temperatures on the applied voltage, the current-voltage characteristics, and the frequency-dependent dynamic conductivity are calculated. In particular, we demonstrate that at low and moderate voltages, the injection can lead to a pronounced cooling of the electron-hole plasma in the device i-section to the temperatures below the lattice temperature. However at higher voltages, the voltage dependences can be ambiguous exhibiting the S-shape. It is shown that the frequency-dependent dynamic conductivity can be negative in the terahertz (THz) range of frequencies at certain values of the applied voltage. The electron-hole plasma cooling substantially reinforces the effect of negative dynamic conductivity and promotes the realization of terahertz lasing. On the other hand, the heating of optical phonon system can also be crucial affecting the realization of negative dynamic conductivity and terahertz lasing at the room temperatures.