After taking that medicine, the bad cough she'd had for a while finally subsided.

Literal

She [topic-は] that medicine [object-を] take [then-て], from-before-of [genitive-の] terrible cough [subject-が] subsided.

薬を飲む literally 'drink medicine' is the standard collocation in Japanese — pills are 'drunk,' not 'taken,' regardless of whether they're swallowed dry or with water. 前から ('from before') with the genitive の attaches to 咳, giving 'the cough that she'd had since before.' おさまる ('to subside, settle down') applies to anything from coughs and inflammations to storms, anger, and political unrest — a versatile verb for things calming back to baseline. Note the implicit cause-and-effect bridged by the te-form: taking the medicine led directly to the cough subsiding.