Generally  there are two things to consider and they are not the same: copyright and plagiarism. 

Plagiarism is attributing the ideas of others to yourself. Your reuse of "a few words" doesn't have that effect, so it isn't plagiarism. In most places, plagiarism is a social, not legal matter, though there are some exceptions. 

Copyright violations involve copying and republishing the words (music, ...) of others, even if you properly attribute it. Copyright is a civil law matter (most places). One of the principles of most copyright law is whether the copying reduces the value of the original to the copyright holders. Again, a few words is almost always unlikely to do that and certainly not in your case. Copying a paragraph, or a chapter, from a copyrighted work is a much different matter. 

But another principle of copyright law (generally speaking) is that for some things there is really only one way to say it. Some mathematical definitions and theorems fall into this category and they aren't limited by copyright which is aimed at creative expression. 

It seems like you are operating ethically. You properly attribute the idea to Y, just as X did. It is only a few words. There are few ways to express the same (proper) idea. 

There could be closely aligned situations, however, in which the idea you are trying to get across is that X agrees withy Y, rather than Y says something. In that case, a citation of X might be needed. 

The title question, however, can't be answered without context. Sometimes yes (as above) and sometimes no, depending on what you want to copy. When in doubt cite and also quote, while minimizing your quotes.