The optimal correction is: She knew the answer but did not speak.
Rationale:
Therefore, "She knew the answer but didn't speak" accurately employs the past simple tense for both actions, establishing them in the same past timeframe.
Poetic Devices: Identify the poetic device used in the following line: "The wind whispered through the trees."