。
Books were scattered all over the room.
Literal
Books [subject-が] room [attributive-の] here-and-there [at-に] were-scattered-[state-ていた].
あちこち ('here and there, various places') is an adverb/noun for multiple locations, contracted from あちらこちら. 散らばる ('to be scattered, be strewn about') is intransitive; paired with ていた gives the resulting state in the past — 'were in a scattered state.' 部屋のあちこち ('various places in the room') uses の attributively to make あちこち a relative location within the room.