I can feel your pain a little. My oldest cat, Ripley, who is 12 years old, is spraying in the house. He does it because he hates change and in the past 6 weeks we've had new flooring installed, painted in some rooms and we've added two kittens to the family. Just this morning before hubby left for work he caught Ripley backing up to the living room wall and spraying.

Anyway, the only thing I have found to help is Feliway spray and the Feliway Comfort Zone Plug-Ins. I think one reason Ripley sprayed again is because I haven't replaced the Plug-In for over 30 days and I've been slack on using the spray daily. You may want to check into those products which can be bought at petstores. I get mine online because it's cheaper.

Also, maybe ask your vet for suggestions.

For trying to get the smell out of your carpet try Nature's Miracle. I've used it and it does help but I don't think it's perfect.