I've found that the question has already been answered on meta stackexchange: Opinions on closing an older question as a duplicate of a newer question [duplicate]
The highest voted answer, by Gnoupi:
No matter which one came first, the most relevant one should be left open, and the other one closed as duplicate.
And the accepted answer, by Bill the Lizard:
Most of the time double posts by the same user are caused by back-button edits, so the newer question is the one the OP really wants to stay. Even if the questions come hours or days apart, I'll usually elect to keep the newer one, since it will typically have more/better content.
In the case of duplicates by different users, I do take the dates into account. The older question usually takes precedence, if all other things are equal. The quality of the newer question can definitely sway my decision though.