This is the instruction from line 11 of Maryland Form 502CR, the form used to calculate the other state credit.
Enter the amount of your 2017 income tax liability (after deducting any credits for personal exemptions) to the other state and locality in the other state (where applicable). Do not enter state or locality tax withheld from your W-2 forms.
http://forms.marylandtaxes.gov/current_forms/502cr.pdf
**Answers are correct to the best of my ability but do not constitute tax or legal advice.