Hi, could you please tell me which tense should be used in the following examples?

I cooked this lunch for two hours. or I was cooking this lunch for two hours.

I repaired this car for two days. or I was repairing this car for two days.

I sold this car for two weeks. or I was selling this car for two weeks.

Thank you very much
All are possible in appropriate context. The last pair sound very odd, however, since a sale is a non-durational action.
Thank you very much. And how about the sentence She made me a cup of tea for five minutes or She was making me a cup of tea for five minutes?
Site Hint: Check out our list of pronunciation videos.
The same applies. If you construct an odd-meaning sentence, then the grammar too seems odd. It does not take 5 minutes to make a cup of tea.
Anonymouscould you please tell me which tense should be used in the following examples?
I wouldn't use any of those sentences. I would use the present perfect continuous.

I've been preparing lunch for two hours.

I've been [repairing / trying to repair] this car for two days.

I've been trying to sell this car for two weeks.

To me, lunch is a meal. Any part of it that needs to be cooked has already been cooked at the time it becomes part of 'lunch'. To me, cooking lunch means taking everything - the salad, the sandwich, etc., putting it in a pot, and cooking it.

You have to have a predicate that connotes activity over time in order to use a for-phrase successfully. If you have a predicate that connotes nearly instantaneous action (win the race, recognize the face, sell the car), you need to add something like "trying to", which connotes activity.

CJ