に夢中になっていた

was engrossed in

→ に
phrase Rare #31,474
was engrossed in Follows the thing someone was absorbed in; the subject is often omitted when clear from context.
JA: 子どもたちはゲームに夢中になっていた。
EN: The children were engrossed in the game.

彼女は詩を書くのに夢中になっていた。

She was engrossed in writing poetry.

少年は模型飛行機の組み立てに夢中になっていた。

The boy was engrossed in assembling a model airplane.

彼女は漫画本に夢中になっていた。

She was absorbed in a comic book.

子供は遊びに夢中になっていた。

The child was completely absorbed in playing.

彼女は仕事に夢中になっていた。

She was engrossed in her work.

彼女はおとぎ話を読むのに夢中になっていた。

She was engrossed in reading fairy tales.