Here's how to understand the difference:
* "Of the days" is used as an adjective describing something related to days.
* Example: "El clima de los dos días fue fantástico." (The weather of the two days was fantastic.)
* "For two days" is used to indicate a duration of time.
* Example: "Voy a estar fuera por dos días." (I will be out for two days.)
To know the correct translation, you need to consider the sentence where "dos dias" is used.