The question says that n^3 is divisible by 24. What does this mean? That if you divide n^3 by 24, then you get an integer. So let’s just write this down: \frac{n^3}{24}=\frac{n^3}{2^33}, where we prime factorized 24. Why do we do this? Well, notice that divisibiliy must happen, so we know that n^3 must have at least three 2’s and one 3 such that this division yields an integer (again, don’t forget the key word divisibiliy). What happens if n=2\cdot 3\cdot k, where k is just any other integer? In any case, we only care about the 2 and 3. Then does n^3=2^33^3, so \frac{n^3}{24}=\frac{n^3}{2^33}=\frac{2^33^3}{2^33} yield an integer (i.e. is there divisibility)? Yes there is, then we know that n=2\cdot 3k=6k, so 6 is the largest number that must be a factor of n.

Thank you for your explanation. I just didn’t get why 8 cannot be the largest number while 6 can.