。
She tried to lose 5 kilos through dieting.
Literal
She [topic-は] dieting [by-で] 5 kilos [tried to-やせようとした].
ダイエットで marks dieting as the means or instrument of the weight loss — instrumental で. やせる ('lose weight, get thin') is the everyday verb for slimming down; its volitional form やせよう combined with ~とする gives 'try to lose weight.' The past tense ~ようとした reads as a completed attempt — the trying happened, the result is left implicit. キロ as a loanword abbreviation stands for both キログラム (kilogram) and キロメートル (kilometer); context picks the right one. キロ for weight loss is the natural choice in everyday speech.