Let Micaela be M
Let Sam be S
M = 2 + S
In 4 years, their ages will be 40 in all
Subtract 8 (because it is 2 people) from 40
40 - 8 = 32
then use 32 to find their ages.
M = 2 + S
S
32 - 2 = 30
30/2 = 15
Sam is 15
Micaela is 15 + 2, or 17
Sam is 15, Micaela is 17
hope this helps