The man invested 1/5 of the money at 4/100. Which says he earns 4/500 of his total money on one month.
He also invested 1/2 of the money at 5/100. Which means he earns 5/200 of his total money per month.
For the last part, he spent the rest of the money which is: x + 1/5 + 1/2 = 1
Make the denominators equal: x + 2/10 + 5/10 = 10/10
Add like terms: x + 7/10 = 10/10
Substract 7/10: x=3/10
He gave this money for 3.5/100 interest. Which equals 10.5/1000 of his total money.
When you add the three values: 4/500 + 5/200 + 10.5/1000
Make denominators equal: 8/1000 + 25/1000 + 10.5/1000
Add the like terms: 43.5/1000
This means the man's money's 43.5/1000 is equal to $870
Set the values equal: 43.5x/1000 = 870
Make the denominators equal: 43.5x/1000 = 870,000/1000
Multiply with 1000: 43.5x = 870,000
Divide both sides by 43.5: x = 20,000
The man's total money is $20,000