Thanks for the chance to assist
Your landlord is responsible to fix this mess
I would notify him in writing. If you did not cause the damage they can not make you pay extra for the carpet
all residential leases and rental agreements contain an implied warranty
of habitability. Under the "implied warranty of habitability," the landlord is legally responsible for repairing conditions that seriously affect the rental unit's habitability. That is, the landlord must repair substantial defects in the rental unit and substantial failures to comply with state and local building and health codes. However, the landlord is not responsible under the implied warranty of habitability for repairing damages which were caused by the tenant or the tenant's family, guests, or pets
The California department of consumer affairs has a very good website that covers this and other issues
I would demand that the owner fix this. If he will not you can fix yourself and deduct from next months rent
The landlord can NOT evict you if you complain and then repair and deduct the problem yourself. This is called "Retaliatory eviction"
If the landlord tries to evict, they have to take you to court. At court you can present evidence that the eviction is improper
In order for the tenant to defend against eviction on the basis of retaliation, the tenant must prove that he or she exercised one or more of these rights within the six-month period, that the tenant's rent is current, and that the tenant has not used the defense of retaliation more than once in the past 12 months. If the tenant produces all of this evidence, then the landlord must produce evidence that he or she did not have a retaliatory motive.296 Even if the landlord proves that he or she has a valid reason for the eviction, the tenant can prove retaliation by showing that the landlord's effort to evict the tenant is not in good faith.297 If both sides produce the necessary evidence, the judge or jury then must decide whether the landlord's action was retaliatory or was based on a valid reason.
Please let me know if you have further questions; if so I will do my best to answer them. If not please hit the accept button, its the only way I get paid.