Whom to cite when describing an argument in another paper that builds upon yet another paper?
I will use 'Johnson (2016)' and 'Smith (2015)' rather than 'Y' and 'X' in my examples:


Explicitly corroborating Smith's (2015) hypothesis that mice love cheese, Johnson (2016) demonstrated that mice ate cheese rather than carrots, when offered both.
Smith (2015) argued that mice love cheese. Johnson (2016), citing Smith, experimentally verified this hypothesis.
Johnson (2016) interpreted her experimental results using Smith's (2015) conjecture that mice love cheese.


If you want to be critical rather than 'mindless' about Johnson's interpretation of the result, just offer alternative interpretations (with additional citations). However, if the original interpretation is plausible, and if the issue is not the focus of your paper, it's okay just to follow Johnson (and thereby Smith).