Here's why:
* "To" is a preposition, but in this case, it's part of an infinitive, which acts as a noun.
* "Do" is a verb, the base form of the verb.
Together, they form a verb phrase that functions as:
* A noun: "I want to do my homework." (The phrase "to do" is the object of the verb "want").
* An adjective: "It's the thing to do." (The phrase "to do" modifies the noun "thing").
* An adverb: "I went to do some shopping." (The phrase "to do" modifies the verb "went").
Let me know if you have any other parts of speech you want to explore!