Ok so if the agent spend 1,500$ on advertising then thats -1,500 for his wallet eg.
WALLET:
-1,500$
Now if the house sells in 3 months that's 9,000 in wallet but since there is only a 40% chance then we need to work out 40% of 9000 we can do that by doing 9000 x 0.40 which = 3,600 so 3,600 in wallet on average
-1,500
+3,600
now if we combine these we get 2,100 so the answer is on average 2,100