1. I was confused by what to do.

2. I was confused at what to do.
3. I was confused over what to do.
4. I was confused about what to do.
5. I was confused what to do.

6. I was puzzled by what to do.
7. I was puzzled at what to do.
8. I was puzzled over what to do.
9. I was puzzled about what to do.
10. I was puzzled what to do.
[Do you mean #5 and #10 are ungrammatical? What about the others? Which prepositions do we have to use?]

4 and 9 are best.

1 and 5 would be better if they were written like this:

I was confused by her actions.
(Her actions caused my confusion.)

I was puzzled by the teacher's reaction.
(The teacher's reaction caused my puzzlement.)

I wouldn't use 5 or 10. The others are OK, but not the best.

All of the sentences you provided are grammatically correct, but there are slight differences in meaning depending on the preposition used. Here's a breakdown of each sentence:

1. "I was confused by what to do." --> This means that something caused you to be confused about what to do. The cause of confusion is stated after the preposition "by."

2. "I was confused at what to do." --> This implies that you were confused when faced with the situation of what to do. The preposition "at" indicates the circumstance in which the confusion occurred.

3. "I was confused over what to do." --> "Over" is similar to "about" in this context and indicates that the confusion was related to the topic of what to do.

4. "I was confused about what to do." --> This is similar to the previous sentence, conveying that the confusion was directed towards the matter of what to do.

5. "I was confused what to do." --> This sentence is grammatically incorrect as it lacks a preposition. To make it correct, you should use one of the prepositions mentioned above.

6. "I was puzzled by what to do." --> This sentence has the same meaning as sentence #1. It suggests that something caused you to be puzzled about what to do.

7. "I was puzzled at what to do." --> Similar to sentence #2, this indicates that you were puzzled when faced with the situation of not knowing what to do.

8. "I was puzzled over what to do." --> Similar to sentence #3, this expresses that you were puzzled regarding the topic of what to do.

9. "I was puzzled about what to do." --> This sentence has the same meaning as sentence #4. It conveys that the puzzlement was specifically related to what course of action to take.

10. "I was puzzled what to do." --> Similar to sentence #5, this sentence is grammatically incorrect, as it lacks a preposition. To make it correct, you need to use one of the prepositions mentioned above.

In summary, sentences 1, 6, 7, 8, and 9 are both grammatically correct and effectively convey the idea that you were confused or puzzled about what to do.