
25^25^25 = 25^625 = (18+7)(18+7)........625Times = 18k + 7^625
therefore, remainder when 7^625 is divided by 9 will remain the same.
Now 7^625 = 7^3 x 7^3 x 7^3.....(208times)x 7
and remainder when 7^3 = 343 is divided by 9 is 1 and remainder when the left 7 is divided by 9 will be 7. 