Explanation:
x = Iman's money
y = Daphne's money
x = 2y
x - 128 = y - 40
now we use the first equation as identity in the second equation and get
2y - 128 = y - 40
y - 128 = -40
y = $88
x = 2y = $176
these were the starting values.
now, after spending, they have both left
176 - 128 = 88 - 40 = $48