I would like to notify another user in an answer, like:
My solution was actually inspired by @John's answer...
Will this work?
I would like to notify another user in an answer, like:
My solution was actually inspired by @John's answer...
Will this work?
No, that will not work. @ replies work only in comments.
No, that should not work. Answers should not be used to reply to people—that's what comments are for. Answers should be reserved only for posting answers to the question being asked.
In your example, it would be rather pointless to notify John. He doesn't need to know that he was a source of inspiration for you. You aren't talking to him, you're answering a question. Remember that Stack Exchange sites are not web forums.
And there's no reason to use an @ reply in your answer to notify the person who asked the question, because they're automatically notified whenever a new answer is posted to one of their questions.
In fact, in general, I recommend against using the @ reply syntax in answers. For one thing, it's confusing because it makes people think that/wonder if it is doing something when it is really not. For another, it looks ugly and just makes the name harder to read. Finally, it has the psychological effect of removing the focus from the technical aspects of the answer and placing it on people.
But that should not be taken to mean that you shouldn't give credit to John (or whomever else) provided the inspiration for one of your answers. Attribution is absolutely required here. Instead, I would recommend linking the text back to John's answer so that other people can find it.