Someone confuse me, he said that when you have some information you want to use it from reference say X, and the reference X inspired this information from reference say Y, then so, I should cite in my work reference Y not X
to what extent this statement is correct?