3-4 days may be too much for Petra. I spent 2 days there and saw everything at a leisurely pace. You could also check out Wadi Rum or Aqaba, which are both about a 3 hour drive from Petra.
3-4 days in Cairo might not give you enough time to check out the sites in the other parts of Egypt. Alexandria is a short drive away but I think other places like Sharm El Sheikh and Luxor may be too far for such a short trip.