💡 Detailed Explanation
"~末に (sue ni)" is used to indicate that a final result was reached after a long time or a complex process. Since the sentence emphasizes the long process of "a discussion spanning three hours," "末に" is the most suitable choice. "~あげく" is typically used when the outcome is negative. "~結果" simply means "as a result" and lacks the nuance of a long process that "末に" implies. "~上で" means "after doing A, then do B," which does not fit this context of an outcome.