Hal_Al
Level 15

Deductions & credits

No. You will have to live in home A until at least 7/19 to be able to exclude the gain. The two years (8/12 to 8/14) you previously lived in it don't count any more, because more than 3 years has passed between moving out and moving back in. 

In addition, if you do wait  to meet the 2 out of 5 year requirement; the portion of the gain (approx 43%) attributable  to the rental time will be taxable. This is in addition to the depreciation recapture