You have to be back at Cairo airport three hours before your departure. That leaves you with five hours. Let's say you are out of the airport in two hours after you land. That leaves you with three hours.
You can head straight to the pyramids, walk around for an hour and then head back.