Answer
After deposing Shah Jahan III, Sadashivrao Bhau reinstalled Shah Alam II as the rightful emperor. This was a strategic move as Shah Alam II was a Mughal emperor and could help to legitimize the Maratha Empire. In addition, Shah Alam II was in debt to the Marathas and would likely be more willing to work with them than Shah Jahan III.