。
She mistook him for someone else.
Literal
She [topic-は] him [object-を] other [genitive-の] someone [for-と] mistook.
The ~を~とまちがえる pattern is 'to mistake X for Y' — を marks the actual entity, と marks the wrongly-identified target. The と here is the comparative/contrastive と that shows up with verbs of comparison and identification (比べる, 違う, 似る, 間違える). 他の誰か combines 他の ('other') with 誰か ('someone') to mean 'some other person' — note that the か stays bound to 誰 even after the と attaches at the phrase boundary.