She didn't like living in town.

Literal

She [topic-は] town [in-に] living [subject-のが] liked was-not.

~のが好きではありませんでした is the polite negative past of ~のが好きだ ('to like doing X'). の nominalizes 住んでいる ('living'), and が marks it as the subject of 好き. The polite negative past ~ではありませんでした is the longest standard polite negation — more formal than ~じゃなかったです.