W2

I also have a question regarding KS tax. I work both in Kansas and Missouri. My W2 shows total wages earned in Box 1. $47,000  from KS and MO and fed taxes withheld.  But when I go down on the W2 to lines 15, 16 and 17. 

Line 15.  
KS         16.  $15,612.    17.  $573    ( Isn't this suppose to be taxed for Total amount earned in Box 1?}
MO.      16.  $31,899     17.   $900 

I am having to pay in a bunch for KS taxes . did my employer just tax me on what I earned in KS? 

Can someone tell me which way this should of been taxed and is the amount for Kansas tax withheld is wrong?