You use the lower of (1) the Basis (purchase price plus cost of improvements) and (2) the Fair Market Value at date of conversion to business for purposes of depreciation.
So in your example, you would use $20,000 (assuming it was $10,000 of improvements, not repairs).
Yes, if you sell it for more than your Basis ($20,000, minus depreciation you take for the business), the gain will be taxable. Just like anything else, if you sell something for more than you paid, the profit is taxable.