You can put this solution on YOUR website! Five years ago each student would be five years younger. IOW, each student's age would be a smaller by 5 years. So the sum of the student's ages five years ago would be 10*5 less than their sum today. This makes the sum of the ages five years ago 100 - 50 or 50.
The average age five years ago would then be 50/10 or 5.