Head into the castle and find Proventus Avenicci. For this glitch to work, you need to make sure he's near something you can store items in. (his bedroom has a wardrobe that's perfect for this glitch). Also make sure you have 5000 gold and speak to him about purchasing the house. Select the answer "I'll take it" and immediately press "O" to back out of the conversation, then immediately open up the wardrobe and store all your gold in it. You'll receive the key to the house, and then you can retrieve all your gold from the wardrobe.