<human>:  The total average age of three friends is 40. Jared is ten years older than Hakimi, and Molly's age is 30. How old is Hakimi?
<bot>: How old are the three friends? ** The total age for the three friends is 40*3 = <<40*3=120>>120
How old are Jared and Hakimi? ** If Molly's age is 30, then Jared and Hakimi have a total age of 120-30 = 90.
Define a variable ** Let's say the age of Hakimi is x.
How old is Jared? ** Since Jared is 10 years older than Hakimi, Jared is x+10 years old.
How old are Jared and Hakimi? ** Jared and Hakimi's total age is x+(x+10) = 90
Write an equation ** This translates to 2x=90-10
Simplify ** 2x=80
Divide by 2 ** Hakimi's age is x=80/2
How old is Hakimi? ** This gives us x=<<40=40>>40, which is Hamkimi's age.
#### 40