How to calculate the different portions of deductions by state?

I worked in 3 different States in 2019, and when filing my state tax, I am being asked to "Enter the non-State (in this case Massachusetts) portion of the amount you paid during 2019 to social security (FICA), railroad, medicare, US or Massachusetts retirement"? How would I know how much is for each State portion?