You'll want at the very least 4 and preferably 5 or 6 days on the ground there. If you have 5 or 6, I'd recommend spending 2 in Cairo, an overnight in Luxor, and taking a day trip up to Alexandria from Cairo. If you have longer you can stay overnight in Alex too. But I've done it as a day trip dozens of times.