State tax filing

Hi, wanted to ask again

i live in KS. Work in MO. Have 529MO (MOST529)

 

i wonder how it works out. 
my understanding is I paid upfront state tax to MO, then MO will return it to me. 
Then eventually pay state tx to KS. 

Should I keep MOsT529 or should I contribute to Kansas 529?

thanks