Why didn't Adom eat from the tree of life first and then eat from the tree of knowledge so he can live forever?
Do any Medroshim discuss this?
The Ramban does not discuss this directly, but he does say the following:
Ramban Bereishis 2:9 - The Tree of Life gives long life, not eternal life.
Ramban Bereishis 2:17 - Before Adam ate from the Tree of Knowledge he would have lived forever.
Therefore, he would have gained nothing from eating of the Tree of Life before the Tree of Knowledge, as he was going to live indefinitely before eating from the Tree of Knowledge anyways. It is only after he ate from the Tree of Knowledge that his eating from the Tree of Life is a concern to Hashem.
This is addressed by R. Isaiah of Trani (the Elder) in his commentary to Genesis 3:22.
ותימה וכי עד עתה לא אכל מעץ החיים והלא הרשה אותו מכל עץ הגן אכול תאכל יש לומר עץ החיים היא רפואה לעץ הדעת והרפואה מועלת לחולה לרפותו ולא להגן עליו שלא יחלה משל למי שישתה סם המות השקהו צרי וירפא אבל השקהו תחילה צרי ואחר כך השקהו סם המות ימות
This is astounding, for until now did he not eat from the Tree of Life? But was it not permitted to him – "from all the trees of the garden you may eat"?
We could answer that the Tree of Life is a remedy to the Tree of Knowledge, and the remedy helps the sick person to be healed but not to protect him from getting sick [in the first place]. This is analogous to someone who drinks poison – if they give him balm to drink he will be healed, but if they give him balm to drink first and then they give him poison to drink he will die.
(Taken from this answer.)