Two compound samples are composed of the same elements but in different proportion, it means the two samples are two different compounds.
Because there are many compound which consist of same elements. for example water and hydrogen peroxide are two different compounds but these compounds consist if same elements, hydrogen and oxygen;
H₂O consist of hydrogen and oxygen and it is water
H₂O₂ also consist of hydrogen and oxygen but it is hydrogen peroxide
So, both are different compounds