The phrase "dost it" may sound unfamiliar to some, but it is simply an archaic form of "do you" or "doth," which means "does." The spelling of "dost" reflects Middle English pronunciation, as it is pronounced with a long O sound followed by a ST consonant cluster. In IPA phonetic transcription, it is spelled as /dʌst/ or /dɒst/ depending on the British or American accent. Shakespearean English features a lot of such archaic terms, which have since evolved into modern language forms.
The phrase "dost it" is a contraction of the verb "do" and the pronoun "it" in Middle English. "Do" comes from the Old English word "don" meaning "to act, perform". "It" is derived from the Old English word "hit", which meant "that thing" or "this thing". Over time, "dost it" came to be used as a second-person singular form of "do it" in archaic English.