The person that bid the HIGHEST would win, and in the case of you both having the same amount - the bid that Ebay accepted first would win.
That said.....No matter what time your bid is placed and how, the person who bids the HIGHEST will always win. 2 hours before, 2 minutes before and even 2 seconds before the close of auction.
Welcome for the forum
Hope to see your around again
Lexie