She wondered where Sam was and what he was up to.

Literal

She [topic-は] Sam [subject-が] where [at-に] is-and what [object-を] is-doing [I-wonder-のかしら] [quotative-と] thought.

A nice example of an embedded double question: どこにいて何をしているのかしら ('where is he and what is he doing, I wonder') stacks two interrogatives within a single clause. The sentence-final かしら is a feminine wondering particle (the masculine equivalent is かな), here embedded inside と思いました ('thought'). The te-form どこにいて chains the location question to the activity question, presented as a single bundle of curiosity. The polite 思いました shifts to a slightly more reflective, narrative register. サム ('Sam') in katakana is the standard rendering for foreign names.