Answer:
40 coins
Explanation:
Note that

To find the least common multiple you have to multiply all common multiplies and then multiply them by all factors that left. Thus,

This means that if Walt and Amy each have 40 coins, then Walt can make 4 stacks with 10 coins in each and Amy can make 5 stacks with 8 coins in each.