Registration of sale deed

Dear sir, We have purchased the property from developer in Bangalore in the year 2004 through GPA holder given by land owner (A) in the year 1996. However, we recently got to know that property was sold by the land owner in the year 2000 to X and X further sold the property to another(Y) person. When we cross verified in the sub registrar office, the encumbrance certificate is showing our name with correct survey number as per the land owner documents and our plot neighborhood documents, whereas the survey number shown by the other person Y who has purchased in 2005 from X is of different survey number with Same plot number as ours. When we cross verified with sub registrar office the signature in the sale deed of X is not matching with the original signature of the land owner (A) in the document of sale deed executed in 2000. However, he (X ) sale deed copy shown to us has original land owner signature. Here, why the sale deed registered does not have land owner signature and both sale deed looks different. Is their document legally valid as their sale deed doesn't match with their sub registrar sale deed document. How do we proceed as our developer says the plot belongs to us and not to X or Y. Kindly àdvise.