2 month rent and painting charges deducted from Landlord

I was staying in the flat since last 2 years with rent of 16k and security deposit 60k under owner 1 The owner 1 sold the flat to owner 2 on 14th August 2024 and returned me my security deposit deducting 14 days of rent Owner 2 would shift in this flat from December 2024 and so he asked me to stay till November only Owner 2 created a new agreement and asked for 60k security amount. I gave him 60k security amount and continued staying in the flat. Since I needed to vacate the flat before December, I was also looking for new flat outside. I got a new flat and shifted on 6th October,2024. When I asked my deposit back from the Owner 2, he told that I should pay November rent also since the notice period given in rental agreement was 2 months and he deducted 2 months rent from security amount. He also deducted painting charges for 1 month. Owner 2 has not painted the flat and given. So why he deducted the 2 months rent because anyhow I have to leave the house before December and I left in October and painting charges was also deducted