Ivy had an equal number of local stamps and foreign stamps at first. She bought

180 local stamps and gave away 36 foreign stamps. She then had thrice as many
local stamps as foreign stamps. How many local stamps did she have in the end?

The "She then had thrice as many local stamps as foreign stamps." sentence can be ignored. Just subtract 180 - 36 = 144 foreign stamps

Hope this helps!