My name is Scott and I am an experienced small animal veterinary surgeon, I will be very pleased to work with you today and will try my best to answer your question to your satisfaction.
The answer here is very short and simple, as cats get older they are unable to retract their claws so much and when they become very old they may not be able to retract them at all.
Their claws will then stick on the carpet. There is nothing you can do about this I am afraid.
This is just something which happens to geriatric cats...
I hope I have covered your question fully enough but if you would like further clarification or to talk things over a bit more then I will be on-line for the next hour or so and I will be more than pleased to continue working with you. Regards,Scott