You'd better consult an attorney who is familar with the employment law of State Y. My feeling is that you may very likely get out of this contract. Good luck!