Initially the man bought the goat at $60 the sold it at $70, thus making a profit of $ 10 (extra), then later on bought the goat at $ 80 and sold it at $90, making another profit of $ 10 (extra). So by the end of the day the man gained $ 20.
Consider it this way, the man made a profit of 10 and decide to invest it back by adding to $60 to raise $70 then made a profit of another $10, totaling to a profit of $20. Thus, the answer is $20.