Anna and Hannah have $80 each. Their friend offered to invest their money, promising to return a sum r times as great as what they invested. Anna was suspicious, so she invested $20 only, but Hannah invested her entire $80. Fortunately, the friend did indeed return a sum r times as great to each. They decided to make another investment. This time, Hannah invested all of the money returned to her, and Anna invested the money returned to her and the remaining $60. Again, they got a sum r times as great as what they invested. In the end, Hannah had twice the amount Anna had.

Write an equation in terms of r that models the situation.

80 r^2 = 2(20 r^2 + 60 r)

To write an equation in terms of r that models the situation, let's break down each investment step by step.

1. In the first investment round:
- Anna invested $20 and received a sum r times as great.
- Hannah invested $80 and received a sum r times as great.

The equation for Anna's investment can be represented as:
20 * r = amount returned to Anna

The equation for Hannah's investment can be represented as:
80 * r = amount returned to Hannah

2. In the second investment round:
- Anna invested the money returned to her and an additional $60.
- Hannah invested all the money returned to her.

The equation for Anna's second investment can be represented as:
(amount returned to Anna) * r + 60 = (amount returned to Anna in round 2)

The equation for Hannah's second investment can be represented as:
(amount returned to Hannah) * r = (amount returned to Hannah in round 2)

3. In the end:
Hannah had twice the amount Anna had, so we can write the equation:
(amount returned to Hannah in round 2) = 2 * (amount returned to Anna in round 2)

Now, combining all the equations, we get the final equation in terms of r:

(20 * r) * r + 60 = 2 * [(80 * r) * r]

Simplifying it further, we have:

20r^2 + 60 = 160r^2

This is the equation in terms of r that models the given situation.