Trisha could not solve the problem at all and was at her wit’s ending.
her wit’s end
The idiom ‘be at your wit’s end’, as used in the passage, means ‘to be so worried by a problem that you do not know what to do next’. Therefore, ‘her wit’s end’ should be used.