A live-in flip is one property: you buy a house that needs work, you live in it as your main home while you fix it, then you sell. What your local contact was pointing at is the federal primary-residence capital-gains exclusion. If you owned the home and used it as your main home for at least two of the five years before the sale, you can exclude a large amount of the gain from tax, up to $250,000 if you file single and $500,000 married filing jointly.
Two things it does not do. It doesn't shield rent you collected, and it doesn't shield wages or any other income. Rent from a basement tenant is its own thing, and renting part of the house you live in also complicates how much of the gain is covered, so that's a conversation with a tax professional before you set it up rather than after.
On the two-of-five wording, the two years don't have to be one continuous stretch, and they don't have to be the two years right before the sale. They have to add up to 24 months of use inside the five years ending on the sale date.
Your renovation money isn't a deduction. It goes into your basis, which is roughly what you paid plus what you spent improving the house. Gain is the sale price, minus selling costs, minus basis. So a new roof lowers your taxable gain by raising basis. Keep every invoice and every card statement in one folder from day one, because basis is what you'll need to prove years later.