1) Please tell me 5 days in advance. Saying "before" doesn't work well because you need an object for the preposition ("before"). If you added an object, then it would work. For example, "Please tell me 5 days before the trip."
2) Please tell me after 5 minutes. Again, if you use the word "before" it feels like you need more information. You could say, "Please tell me before 5 minutes are up." or "Please tell me before 5 minutes is added to your detention." We don't know what the before is referring to. But with "after" it is understood that we mean after 5 minutes end, you want the person to tell you something.
3) Please call me in 5 minutes. - correct
4) Please hand in your school work before/ after 12 July 2013.
You can't make a choice on this without knowing when you are supposed to hand in your school work. Both choices (before/after) are grammatically correct. It just depends on whether the teacher wants your work before a certain deadline or wants students to wait until after a certain date.
5) I will be free after 3 months. - correct You could also say, "in 3 months."