If I have a second home, how can I minimize the tax burdern?

I have a large amount of profit and want to buy a second home but am worried it wont qualify