Verbs can function as adjectives. Consider the sentence
Sam didn't know what to do.
"Sam" is the subject, and "didn't know" is the finite verb. To find the complement, we should ask, "Sam didn't know what?" The meaningful answer to that question is the phrase "what to do." Because "what to do" is not a sentence, the "to do" is not a finite verb — it functions as an adjective that modifies "what." [Note that, by itself, the "what" could mean other things, for example, "what to say," or "what to think."] Thus, in our example, the "what," modified by the "to do" is the direct object of "didn't know."
Directions: Working sentence by sentence, place parentheses around each prepositional phrase. Then underline every finite verb twice, and every subject once. Label the complements ("PA," "PN," "IO," or "DO").
1. I was finally going to learn how to swim.
2. Alice knew what to say.
3. I didn't know how to swim.
4. I didn't know what to do.
5. Then my mother tried to describe to us how to cook pancakes.
6. How to play was a big question.
7. What to do was anybody's guess.