。
He was alone in the room.
Literal
Room [in-には] he [subject-が] alone was.
一人だった (was alone) uses the number 一人 as a predicate nominal — he was 'one person.' The が marks 彼 as the subject within the locative frame set by には.
He was alone in the room.