She was busy doing her homework.

Literal

She [topic-は] homework [object-を] do [nominalizer-の] [with-に] was-busy.

~のに忙しい is a useful pattern: the の nominalizes the verb, and に marks what keeps her busy. 宿題をするのに忙しい = 'busy with doing homework.' This is distinct from the concessive のに (despite), which follows a complete clause — here, のに = の (nominalizer) + に (purpose/focus particle). The past tense 忙しかった places the busyness in a past time frame.