Who is "THEY"?
Whom do you expect to get the money from?
Are you using a Title Company? If YES, then the Title Company will divide the proceeds accoding to the Escrow instructions.
If you are not using a Title Company, I couldn't guess who will divide what money, nor how.
Good luck and may God bless