Deductions & credits

Which home is it declared against?  The first residence, which is sold or the second residence which was purchased?  Presumably the first, since the loan papers are against that.