Assume that the rock is a sedimentary rock and that the layers have not been disturbed by earthquakes r other events.

Why are the fossils in layers of rock?

Fossils are found in layers of sedimentary rock because sedimentary rocks are formed by the accumulation and cementation of sediment over time. As layers of sediment are deposited, dead organisms and organic matter can become trapped and preserved within the rock. Over time, this process can create distinct layers in the rock that contain fossils of different organisms that existed during that period. This is why fossils are typically found in specific layers within sedimentary rocks, providing valuable information about the history of life on Earth.