私は先生がネコを好きだと思います
Why を and not が twice?
This is an interesting phenomenon. In a simpler sentence:
先生が猫が好きだ,
the predicate 好き
is a na-adjective, so it does not have the ability to assign accusative case to its arguments. Therefore,
×先生が猫を好きだ
is ungrammatical. However, when it is embedded under a verb that can assign accusative case and there is no other noun phrase that needs to be assigned accusative case, then the object of 好き
can receive accusative case (remotely) from that verb. Either the nominative (が
) or the accusative (を
) becomes available.
私は[先生が猫{が/を}好きだ]と思います
In the example above, 猫
receives accusative case を
not from its predicate 好き
but from the verb 思う
. This is called Exceptional Case Marking construction.
Similarly in English, the subject in a simple sentence needs to be in nominative case:
He is smart.
so having accusative case on the subject is ungrammatical:
×Him (is/to be) smart
However, when it is embedded under a verb that can assign accusative case and there is no other noun phrase that needs accusative case, then the embedded subject can receive the accusative case (remotely) from the verb in the main clause:
I consider [him (to be) smart].
Here, him
is accusative case marked not by its predicate smart
but by the verb consider
.
he
, him
because English nouns do not show case differences.
私は先生が猫を好きだと思います sounds all right to me, while 私は先生は猫が好きだと思います would sound more natural.
Actually the first sentence (in the OP) is more like answering to the question asking 'Who likes cats?' while the other one (which I showed here) is answering to 'What do you think your teacher likes?'
I wouldn't say 私は先生が猫が好きだと思います... Why not? It just sounds unnatural... Well I might say that but wouldn't write that at least.