p will be odd. therefore p2 will be odd. therefore p2-1 will be even.
the greatest divisor will be p2-1 itself. the next largest divisor will be (p2-1)/2.
(in your example p = 5. so p2 - 1 = 24. 24 is a divisor of 24. but, if you only want "proper divisors", the next largest divisor is 12).