I think W4 serves for your withholding allowance. When you submit your W4 to your HR, they withhold taxes for Federal and NY, not NJ because your workplace is NY. When you do tax return next year, you will get some return from NY but will need to pay a bit to NJ.