It is doable. By selling your second home for a profit, you will have a capital gain. If you rented your mobile home anytime in 2016, you will need to report your rental income but can deduct any rental expenses to reduce the net rental profit. If your rental expenses is more than the rental income, after offsetting the rental income, it can be used to reduce other non-passive income including your capital gain. ( Exception applies for Real Estate professionals)