You have received good advice form the others who replied. Think this through. If your friend is truly a friend, he will not want you to suffer any hardship on his behalf.
Based on everything I've read here, I would definitely contact a real estate attorney to help answer your questions. I understand your concerns about the market and the future resale value of whichever home you choose, but no matter what anyone says, no one can predict the market, so if someone advises you that you'll "definitely" make money out of a property, be aware. You're in a tough position and I can understand your fears and concerns, which is why I (and others) think you should contact an attorney to help you through the process. Your real estate agent should be able to recommend someone to you and if not, ask here again and I'm sure someone could recommend several to you. Good luck with everything, house buying can be great, but can also be nerve wracking. My best advice is to think it through, but try not to psych yourself out, its easy to do with all the money involved and the emotions that get tied up in the purchase of a home. Definitely communicate with your Realtor any thoughts, concerns, or fears you may have and let them help you, that's what we're here for!
Buying a home is emotional, so you need to guard your feelings. Your friend needs sympathy and help, but you cant put your lives on the line for your friend to that degree. If you genuinely love the home, then re-read the contract of your purchase and see if you have a way out such as an "option period" or a serious malfunction of a major component of the home. If not, you could loose your earnest money for "terminating " your contract or be sued to perform. Has your Realtor given you any advice?
I would be happy to talk to your friend to see about me purchasing it, if you dont. Your friend
has a serious problem. I have done some debt counseling through church and am willing to see if I could help in that area also.
There is a lot of information that I would need to know before advising you, but I can tell you that if you are in contract and did not use a Realtor, then you need to contact a real estate attorney.
Second thoughts in making the purchase of a home, are as common as breathing. So you are no different than anyone else.
It is too bad that your friend did not approach you before you purchased another home. I wish you the best in this situation.