にいたの

was/were at or in

→ に
phrase Common #7,214
was/were at or in The の at the end can make this a conversational question.
JA: 昨日、彼は学校にいたの?
EN: Was he at school yesterday?

先週はトムもメアリーもボストンにいたの?

Were both Tom and Mary in Boston last week?

トムとボストンにいたの?

Were you in Boston with Tom?

本当にトムはこんな所にいたの?

Was Tom really in a place like this?

彼女が行方不明になった夜その海岸にいたのか?

Were you on that beach the night she went missing?

— レベッカ (1940)

トムは去年ボストンにいたの?

Was Tom in Boston last year?

先週ボストンにいたの?

Were you in Boston last week?