2 different states Tax filling (one as resident and the other one is NR)

I had 2 jobs in 2020: One from Employer in MD and I have W-2 including MD state tax withheld - The second Employer is in MA and I have W-2 including MA state tax withheld.

 

Please note that I spent the whole year resident in MD, so for the second job I was 100% remote. When I added the information for my federal taxes in TurboTax, I downloaded the 2 states and started the information there.

 

In MD, they consider the whole gross income as from the federal taxes. for an income of $430K, the calculation is MD state tax of $36,000 which is approximately 8.5%. This is very high for a state tax. In my filling for MA, I mentioned that no working days were there and added income abortion that lead to a full refund of the withheld amount.

 

My main question:

Is my filing to MA correct? I should not pay state tax there as I was NR?

Why MD state tax calculation comes very high at 8.5%? Shall I add MA withheld as a credit?