What your husband's friend did was to "assign" the contract to another to fulfill his obligation thereunder.  Some contracts specifically address this issue indicating that the contract can not be assigned (simple really).  But if the contract does not speak to it then it may be quite legal.   He sold him the rights under the contract that you two had.  He did not sell him the bike per se but the right to buy the bike.  I would check with an attorney in your area as to what you can do about this.  Contracts are personal agreements as between parties and I can see how this o would be upsetting to you.  Good luck.