This does not seem like fully correct English to me. It is as if some words and/or some punctuation are missing. My guess is that it means that if they could not pay the fine then they would get two months' imprisonment (or that they couldn't pay the fine and hence did get two months' imprisonment).
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.