If state B had such a law then it would be illegal. Even California, which is notorious for its tax policies, draws the line at “California-sourced income”, unless it was from a tax-free or lower taxed state, in which case you will only owe the difference.
State B has a law that says if you spend more than 180 days a year in State B, then you owe State B income tax for the full year.
Now you owe tax for that 1 day to both states.