Answer to Meneer Guggenheimer: Just to see the Pyramids, you would be able to make it during your 5 hour layover (if your initial flight into Cairo is on time). If you do not deal with either EgyptAir or Karnak Travel to enter the country during your layover, you will be expected to sort out your own entry formalities. If traffic in the city is in your favor, you would probably have some time to spend near the pyramids, as FlyingPharaoh suggested.
Answer to carrotjuice: When you arrive you have the option of contacting either EgyptAir about the free hotel room, or Karnak Travel about the tour options on offer. You would pay for Karnak Travel's services. So EgyptAir is not the one giving you an option of a free hotel room versus a Pyramids tour, you choose which one you will deal with. In your 7 hour layover, you could comfortably do the Pyramids tour for 3-4 hours, or spend time at the free Iberhotel tour, or combine these two options like I did by contacting Karnak Travel officers after checking into the Iberhotel. If you take this last option, I suggest you check out of the hotel room before departing for the Pyramids tour, and ask to be dropped off directly at the airport at the end of the tour.