I don't feel like doing a formal proof, but it looks like it should be a direct consequence of the pumping lemma:
"Informally, it says that all sufficiently long strings in a regular language may be pumped—that is, have a middle section of the string repeated an arbitrary number of times—to produce a new string that is also part of the language." [1]
Needless to say, this exercise would be trivial if you just covered the pumping lemma and its applications in class, and next to impossible if you never heard of it.
[1] https://en.wikipedia.org/wiki/Pumping_lemma_for_regular_lang...
PS. I took 15-251 back when it was 15-299: a brand new class without a regular number assignment. Honestly, I would have enjoyed it a lot more now than I did back then. But several assignments still stand out for me, in particular "Building from scratch" [2]. Trying to get some of that feeling now, working through Turing Complete[3] with my daughter.
[2] https://www.cs.cmu.edu/afs/cs/academic/class/15299/handouts/...