She's at her wits' end with her son. He sometimes doesn't come home until 3 or 4 in the morning.
Literal
She [topic-は] son [with-に] is-at-complete-loss. Sometimes 3 or 4 [until-まで] does-not-come-back [explanatory-のだ].
困り果てる ('be at one's wits' end, completely stymied') is a strong compound — 困る ('be troubled') + 果てる ('reach the limit, be exhausted'). The verb ~に困り果てる takes the source of trouble with に. 時には ('sometimes, occasionally') uses the adverbial 時に ('sometimes') with は for contrastive emphasis — 'on occasion, [though].' The のだ ending adds explanatory force: 'the situation is X / let me explain that.' The sentence reads as a tired parent's commentary.