Is it the same sentence if "He thought that i had won"?
When the secong subject is not specified, it means it is the same as the first one, unless you have a specific context.
In this case, it would be "Ele pensou que eu tinha ganhado", but I prefer "Ele pensou que eu tivesse ganhado".
Não seria o conjuntivo aqui? "Ele pensou que tivesse ganhado"? Ou não?
It also works.