How does Turbotax calculate qualified mortgage interest deduction for a house purchase before 2017 and one after 2017

Hi, we have two primary houses in the family. One(A) was purchased before 2017 and one(B) after. The mortgage balance for A was around 450K and the balance for B was around 400K. The total is exceeding 750K. However as A was purchased before 2017 and balance was under 500K, I thought all interest was qualified for deduction? The interest paid for A was around 10K in 2022. For house B, the interest I paid was around 11K in 2022. There are essentially three ways to calculate the qualified deduction:

1. (11K+10K)*[(450K+400K)/750K]

2. 10K + [(750K/2)/400K] * 11K

3. 11K + [(750K-450K)/400K] * 12K

 

Which one is correct? Or are they all correct and I could just choose the highest one? The current number from turbotax is pretty low and under my expectation.

Thanks!