The firsr one would be *extrusive igneous rock*,which is formed magma ejected by extrusive volcanism such as volcanic eruption or fissure eruption.
And the second one is *metamorphic rock* as rock undergoes intense heat and pressure, the original rock would change into metamorphic rock,having different appearance or even chemical composition.
hope it helps!