1. He has been working for three hours.

2. He has worked for three hours.
3. He worked for three hours.
4. He worked in three hours.
===========================
What about these sentences? We can use 'for' from #1 to #3,right?
What about #4? Can we use 'in' or 'for' in this case?
When do we use the preposition 'for'?

"in" means within the three hours allotted or allowed, less than but no more than three hours. "for three hours" means he filled all three hours with the work. Number one and number two imply that he has been working for three hours, but is not finished yet. Number three implies that we worked for three hours, but does not say the task was completed. Number four doesn't really make sense because it does not state or imply that the work was completed or not.

In sentences 1 to 3, the preposition "for" is used correctly to indicate the duration or period of time during which the action of working has taken place.

1. "He has been working for three hours" suggests that the person started working in the past and has continued working up until the present moment.

2. "He has worked for three hours" implies that the person completed their work within a period of three hours, but it does not specify if the work is ongoing or finished.

3. "He worked for three hours" indicates that the person completed their work in the past within a period of three hours.

As for sentence 4, "He worked in three hours," it is not grammatically correct since it lacks a preposition that would indicate the specific time frame.

In English, the preposition "for" is commonly used to indicate a duration or time period. It is used to specify the length of time that an action or state has lasted or will last. For example, "I studied for two hours" or "She has been waiting for a long time." The usage of "for" emphasizes the duration of an action or state in relation to time.