Worked in different states

"I'm a MD resident and worked in MD Jan 2016. I was transferred to KS in Feb 2016 and stayed there until July 2016. I then moved to TX and became a resident. I have a W2 from MD (they took tax out) and another W2 from KS (state tax also taken out). I know I need to file with MD.....do I need to file with KS or can I somehow indicate to MD the amount of tax that KS took out. Also, the Box #1 on each W2 (MD and KS) differ by about 1%"