the first thing I would do is apply the offset to both. The one on the left gets -(offsetx/2) and the one on the right gets (offsetx/2) this should put the mouse between them. then your movement limits become
>(MouseX-offsetx/2-shipwidth/2) and <(MouseX+offsetx/2+shipwidth/2)
>(MouseX-offsetx/2-shipwidth/2) and <(MouseX+offsetx/2+shipwidth/2)