All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
If the seller has sold you a specific car and later you discovered that he did not own it at the time of sale and he was not authorized to sell it [on behalf of its owner], then the sale is undoubtedly invalid, because among the conditions of the validity of the sale is that the seller must own the commodity or that he is authorized to sell it.
Indeed, there is a Hadeeth that prohibits selling what one does not own. Hakeem ibn Hizaam said: “I asked the Prophet saying: “O Messenger of Allah, A man comes to me asking to buy a commodity that I do not have (own). Can I sell it to him and then I buy it from the market for him and then give it to him?" He said: "Do not sell what you do not own.” [Ahmad, Abu Daawood, At-Tirmithi, An-Nasaa’i and Ibn Maajah]
There is an agreement that this sale is invalid. Haashiyatur-Rawdh authored by An-Najdi, from the Hanbali school of jurisprudence, reads:
“Al-Wazeer said: ‘They [the scholars] agreed that it is not permissible to sell what one does not possess or own, then he goes to buy it for him (the buyer), and that this sale is invalid.’” [End of quote]
Since the sale is invalid, then there nothing results from it and the ownership of the car did not transferred to you. The solution is to correct the previous contract by renewing the contract of sale and then you would own the car with the new contract.
Allah knows best.