What do you expect to happen and what happens instead?
It doesn't just "not work", it does SOMETHING, or NOTHING but "not working" doesn't describe what that is.
Likely nano tells you what to do next, and what you need to do is to read what it says.
You can also use another editor, or some alternative method of adding that line.
For example, you can append a line like this:
echo 'alias hy="history"' >> ~/.bashrc
But before you just paste that in and declare it to work, keep in mind that the important part is to be able to do this yourself, not to just get past the exercise.
So what you should do is still to learn how to use nano (which is probably the simplest terminal text editor)