1. While he was playing the guitar, Tom entered the room.

2. While he played the guitar, Tom entered the room.

3. While he was playing the guitar, Tom was entering the room.

(Are they all correct? What is the difference between #2 and #3?)

4. When he was playing the guitar, Tom entered the room.

5. When he played the guitar, Tom entered the room.

6. When he was playing the guitar, Tom was entering the room.

(What about these sentences? Can we use 'when' instead of 'while'? Is there no difference between them?)

If "he" and "Tom" are different people, then yes, 2 and 3 mean 1, and 5 and 6 mean 4.

3and 6 are a bit awkward, but they will work.

1. While he was playing the guitar, Tom entered the room. - This sentence conveys that Tom was in the process of playing the guitar at the same time he entered the room. The continuous tense "was playing" implies that the action of playing the guitar was ongoing.

2. While he played the guitar, Tom entered the room. - This sentence describes a simultaneous action. However, it uses the simple past tense "played" instead of the continuous tense, which suggests that the action of playing the guitar was not ongoing but happened at the same time Tom entered the room.

3. While he was playing the guitar, Tom was entering the room. - This sentence implies that both actions (playing the guitar and entering the room) were ongoing at the same time.

The difference between sentence #2 and sentence #3 is the tense of the verbs used. In #2, the simple past tense is used for both actions, indicating that they happened simultaneously but independently of each other. However, in #3, the continuous tense is used for both verbs, suggesting that the actions were happening simultaneously and continuously.

Moving on to the next set of sentences:

4. When he was playing the guitar, Tom entered the room. - This sentence is similar to sentence #1. The continuous tense "was playing" suggests that the action of playing the guitar happened before Tom entered the room.

5. When he played the guitar, Tom entered the room. - This sentence, like sentence #2, uses the simple past tense for both actions, indicating that they happened at the same time but independently of each other.

6. When he was playing the guitar, Tom was entering the room. - This sentence, similar to sentence #3, suggests that both actions were ongoing and happened at the same time.

In these sentences, "when" is used instead of "while" as a conjunction to convey the simultaneous actions. "When" generally implies a temporal relationship, while "while" implies a concurrent relationship. However, in these particular sentences, there is not a significant difference between using "when" and "while" to connect the actions. The subtle distinction usually depends on the context and the writer's preference.