If you are ticketed all the way from your original departure airport via Amsterdam to Cairo then your luggage will be taken from the plane in Ams directly to the Cairo plane so you can forget about it untill you get to Cairo. You also get a boarding card for your Cairo flight when you first check in so don't have to check in at Ams.
If, on the other hand, you've booked 2 separate flights with 2 different carriers you will have to collect your luggage in Ams before checking it in again for Cairo. If that is your scenario it cuts considerably on any time you have for a trip into the city.
If you are ticketed all the way through you have plenty of time to get into the city. You should be in Amsterdam itself easily in an hour from landing. That will give you about 4 hours in the city before setting back to Ams in plenty of time for you to get through security and get to your boarding gate.