First things first: Retain an experienced bankruptcy lawyer in your area and do it quickly. While you mention a foreclosure date in just a few weeks, it is not clear whether you are referring to a hearing on granting judgment, a sheriff sale, or the final event, which is a judicial confirmation of sale. So I cannot tell just how much time you have until your rights in the property or actually I suppose your friend's rights in the house come to an end. Your situation is ticklish, but a skilled lawyer may find some equitable argument which could postpone matters until you can make the rather complicated legal arrangements to try to sell the house.
Answered on Jul 29th, 2015 at 2:47 PM