The seller makes the final choice. If both offer prices are the same, the sellers agent will also discuss with the seller the differences (if any) on the type of loan the buyer is using, the current "confidence to close" by weighing things like whom the lender is, if they meet closing dates, if the lender guarantees the closing, if the buyer is fully underwritten approved or if they are just at preapproval stage, etc.
Sometimes it is in the buyers best interest to write a personal letter to the seller, that their agent will pass along to the seller, discussing how the home fits the buyers families needs. The letter may bring an emotional response from the seller and "may" help swing the sale acceptance your way.
Also, it is no unusual for the seller to make a "multiple counter offer" back to both buyers to see if either were willing to make the terms a tiny bit better etc.