What type of rock formed first on earth and which rock is the oldest?
Does look a bit like a homework question..

First rock

Igneous rocks would have formed first, obviously, although if we consider the pre-Mars-forming collision Earth, then the process of cold accretion could have initially formed metamorphic rocks at the center of the early planetoid..

And that planetoid would have to be considered sedimentary, formed out of dust particles.

So what the first rock is depends on how you define Earth, or the point at which a specific planetoid would be positively identified as Earth.

Oldest Rock

First, are we talking about the oldest identifiable mineral grain (Zircons, about 4.4 billion years old), or the oldest complete rock (Isua Greenstone Belt, Greenland, 3.8 billion years). The first may qualify as part of a sedimentary rock, the second is metamorphic - but with a volcanic original rock.

And, of course, there could well be a meteorite out there - yet to be discovered or dated - that originates from outside the solar system and is therefore older than the solar system. That would qualify as the oldest rock on the planet.