She is absorbed in writing a book.

Literal

She [topic-は] book [object-を] writing [in-のに] absorbed-is.

のに here is the nominalizer の followed by the particle に meaning 'in (the activity of),' not the contrastive のに ('even though'). 没頭する is a useful Sino-Japanese compound meaning 'to be immersed/absorbed,' literally 'to submerge one's head.'