Riddle Puzzle

I’ll try this solution, the real fact is that I didn’t get how to use a textbox as user input, but I guess I have to try!
Thank you for your answer!