So, wait. He starts off with $40 for working 3 hours.
That means that he earns $13.34 per hour. (It's a repeating decimal, so I rounded it)
If he works another 7 hours, then he earned $93.34 (It's also repeating).
But he spent 1/3 of that money earned in the 7 hours, so he spent $31.11.
That means he had around $62.22 left from those 7 hours.
You would then add the $40 with the $62.22 and would get:
(It's an estimate, because of the repeating decimals)