Query (b) is composed of two segments that are syntactically independent, but semantically connected.
the first segment is an interrogative sentence rooted in the word done and the second is a noun phrase which specifies the pronoun it from the first segment.