Deductions & credits

No.  To be a deductible mortgage, the loan must be (a) secured by the property and (b) used to buy, build or remodel the home.

 

Because the loan is secured to your original house A, but was used to build house B, it does not meet those tests.

 

And unfortunately, due to time rules in publication 936, you only have 90 days after house B is finished (gets its C/O) to take out a mortgage on house B for it to count as deductible acquisition cost. 

https://www.irs.gov/publications/p936