Final answer:
Sedimentary rocks are the only types that form due to compacting and cementing, such as sandstones and limestones. Igneous rocks form from cooling lava or magma, while metamorphic rocks result from the alteration of igneous or sedimentary rocks under heat and pressure.
Step-by-step explanation:
The types of rocks that are likely to be formed due to compacting and cementing are sedimentary rocks only. This process refers to the lithification of sediment, where loose grains of sand, mud, or other particles are compressed over time and cemented together to form a rock. Sedimentary rocks such as sandstones, shales, and limestones are classic examples of this process.
In contrast, igneous rocks form from the cooling and solidification of magma or lava, without the need for compaction or cementation. Examples of igneous rocks include basalt, obsidian, and granite. Meanwhile, metamorphic rocks are created when either igneous or sedimentary rocks are subjected to high temperatures and pressures, altering them physically or chemically, but not by compacting or cementing.