,because I really do not understand how to do it, if not wrong. I'm wrong only in the state of Massachusetts, I only have to put the state income tax ?????
You report all your income and file a resident tax return in Massachusetts and a nonresident tax return in Connecticut.
In general, the nonresident's state of residence will allow a credit for the income taxes paid to Connecticut for income earned in Connecticut. The nonresident who works in Connecticut will be required to file a nonresident return (Form CT-1040NR/PY) in Connecticut as well as a resident income tax return in his state of residence.
Also, for more general information please see: https://turbotax.intuit.com/tax-tips/state-taxes/multiple-states-figuring-whats-owed-when-you-live-and-work-in-more-than-one-state/L79OKm3jI