Answer:
Amy is 14 years old and Sam is 10 years old.
Explanation:
Let's represent Amy's current age as "A".
Since Sam is four years younger than Amy, his current age can be represented as (A - 4).
Five years ago, Amy's age was A - 5 and Sam's age was (A - 4) - 5 = A - 9.
At that time, Sam was half of Amy's age, so we can write the following equation:
(A - 9) = (A - 5) / 2
Expanding and simplifying the equation, we get:
A - 9 = 2A / 2 - 5 / 2
A - 9 = A - 5 / 2
7 = A / 2
A = 14
So, Amy is 14 years old and Sam is (14 - 4) = 10 years old.