I am in the middle of an agile sprint. Midway we realize that the requirement that we were working upon, could have been done in an easier fashion in a totally different way. The development work done on the current requirement wont be needed at all or needs to be changed totally. How is this handled in Agile? Even if we do communicate timeline and impact changes what is the formal method of handling this.
If you are faced with the work needing to be re-done, you re-do it.
Re-doing the implementation of a product backlog item does not necessarily require any user story to be re-written. The motivation to re-do the implementation may not have had anything to do with a change in the user story.
Re-doing some implementation also does not necessarily require a sprint to be cancelled. Sprint-cancellation should be rare. Scrum teams do not always accomplish everything that they set out to accomplish in a sprint.
Scrum does not aim to minimise effort. Scrum aims to produce high quality increments of a deliverable solution. If you use Scrum, you accept that sometimes "re-work" will be necessary. If you want to aim for minimised effort and re-work, you might adopt a different method.
(I assume, you do not mean "in Agile", but more specifically "in Scrum" - otherwise asking for "what is the formal method" does not make much sense).
If the change is so essential that the work on the sprint, as it was planned, becomes nonsensical, the product owner should cancel the current sprint and initiate a new one (see, for example, here). Of course, he should dicuss the issue with the team first.
This is hopefully a situation which does not occur too frequently in your team.