She didn't know what to say.

Literal

She [topic-は] what say [if-て] good [question-か] didn't-know.

なんと言ってよいか is an embedded question with three layers: なんと (the interrogative 'what / how'), 言って ('saying,' te-form), and よいか ('whether good / whether one should'). The pattern [verb-て]+よい/いい is the same conditional-evaluative seen in ~ばよい — 'it's enough to / one should / it's good to.' All folded into a noun phrase by the final か, which serves as the implied object of 分からなかった ('didn't know'). The sentence captures a recognisable moment of social paralysis — formulaic enough to be common, complex enough to be a workout in embedded-clause structure.