Is using an old book's solution considered cheating?
One more thought in addition to Buffy's answer:

Transparency is maybe the solution here: tell your prof "I remember this problem, I met it studying book last summer. How shall I proceed with the assignment?"


This will ensure that there won't be any ground for accusing you of cheating
Prof may give you another assignment, from which you can learn more.