I'm trying to understand the different constructions used for expressing sameness.

So:

я купил тот же автомобиль, что и он

or:

я купил такой же автомобиль, как он купил

Actually, I'm less sure about the second one, which is based on what a well-known translator is giving me.

I think there is also a variation in which the second clause can use у него?

спасибо