Or it might have been posed more like, "Prove the following equation."
31 OCT = 25 DEC
If you re-write this, just slightly, as
31oct = 25dec
then you can use a pair of puns ("October" and "octal" are both customarily abbreviated "oct." and "December" and "decimal" can both be written as "dec." (ignoring capitalization)) to move the problem out of the calendar and into numbers.
Once it's numbers, you can look at "31" as being a base 8 number and "25" as being a base 10 number and, it's easy to show that, since
3 x 8 + 1 = 2 x 10 + 5
these are indeed just two ways of writing the same number.
So, the dates for Halloween in base 8 (octal) and Christmas in base 10 (decimal) are the same.
Unfortunately, I can't remember the name of the professor who set the exam for proper attribution.
Oh, the first line of this post might have been, "Warning: math ahead." But I was hoping a math-o-phobe or two might be tricked into reading it.