Elaborate on how righteousness was restored in two avatars of Lord Vishnu- Lord Rama and Krishna.
In both avatars, Lord Vishnu descends to Earth in order to rectify that which is wrong. In the Lord Rama avatar, the Lord comes to Earth in order to obliterate the demon king of Lanka, Ravana. In doing so, the Lord also demonstrates the need for human beings to follow dharma, or the call of the natural order of the universe. Through his example in many different settings, human beings understand the true nature of what being should be. As Lord Rama, Vishnu is able to teach human beings about the need to possess honor and dignity in terms of upholding one's duty in the natural order of being. This stress on law and a sense of order within it is in stark contrast to Ravana, who takes whatever he likes and breaks all natural orders in order to satiate his own desires. In defeating him and representing honor over dishonor, Lord Rama is able to restore a sense of dharma in the world and teach to others what must be understood in the very nature of being.
As Lord Krishna, Lord Vishnu is able to instruct individuals more about the notion of duty and responsibility. Consider Lord Krishna's guidance to Arjuna who cannot fulfill his duty because he feels agonized over what he must do. Lord Krishna's detailing of what needs to be done in the form of the Bhagavad- Gitais a full detailing of how individuals are supposed to act in the face of agonizing conditions. In this avatar, Lord Krishna is well aware of how people might abandon righteousness in the name of agony or the desire to "cut corners." Lord Krishna, through is discussion with Arjuna, repudiates this in the idea of complete surrender to Krishna is the only way in which an individual is able to alleviate themselves of the pain and confusion that exists in the modern setting. When the Lord tells Arjuna that one does what one must do not for "the fruit of the labor," it is a way to establish righteousness for it stresses to individuals that to simply do one's duty in the name of the Lord is its own reward. Eliminating the obsession with fruits of one's labor enables individuals to focus their energies entirely on that which is right and ensures complete submission to a higher entity than oneself. In this, there is a sense of righteousness restored.
In the words of the Gita, Lord Krishna speaks to why he must materialize at different points in being in the world. His statement speaks to how Lord Vishnu's avatars function:
Whenever righteousness wanes and unrighteousness increases I send myself forth. For the protection of the good and for the destruction of evil, and for the establishment of righteousness,
I come into being age after age. (Gita:4.7–8)
In this statement, Lord Krishna speaks to how the avatars of Vishnu function. In teaching human beings how things should be and how they should act, humans are disarmed in the name of the divine and recognize the need to model themselves after the Lord in reestablishing righteousness in what should be from what is.