I'm Doug, and I'm very sorry to hear of your situation. My goal is to provide you with excellent service today.
The average life expectancy of carpet in a rental unit---as opposed to a home which generally has upgraded carpet in it, it about 10 years at the outside and depending on how many tenants have lived in the unity at a time, the normal wear and tear can destroy a carpet even sooner.
If the carpet was 8 years old, then unless you cause staining or ripping or some other damage, you should not be responsible for any of the carpet replacement cost, or at most a very small percentage of the replacement cost. As for painting, if you are in the unit 5 years and didn't take it upon yourself to repaint without permission and there is just normal wear to the walls, then the landlord is obligated to pay for repainting themselves. Paint has a life expectancy in rentals of 5 years or less.
While there is no law to cite, judges are well aware of this benchmark for builder grade carpet which is almost always placed in rentals.
You may reply back to me using the Reply link and I will be happy to continue to assist you until I am able to address your concerns, to your satisfaction.
I hope that I have been able to fully answer your question. As I am not an employee of JustAnswer, please be so kind as to rate my service to you. That is the only way I am compensated for assisting you. Thank you in advance.
I wish you and yours the best in 2016,