你拆解错误。She didn't know [what to do](know的受词)where 修饰的是 the situation。(我们中文也有“在这情况/状况里头(如何如何...)”的叙述表达,这用的是抽象的空间概念):She had to work with such a tough person [inthe situation->where].
https://www.ahdictionary.com/word/search.html?q=whereUsage Note: ... *Where is also used to mean "in which