Tim had some money at first. He spent 20% of it on a shirt. After that, he received $50 from his mother. He then spent 60% of what he had then on a book. The cost of the book was $40 more than the money his mother gave him. How much money did Tim have at first?

(1) $ 100
(2) $ 125
(3) $ 150
(4) S 175

Let's represent the amount of money Tim had at first as x.

After spending 20% on a shirt, Tim has 0.8x remaining.
After receiving $50 from his mother, Tim has 0.8x + $50.
The book cost $40 more than what Tim received from his mother, so the cost of the book is (0.8x + $50) + $40 = 0.8x + $90.
Tim spent 60% of what he had then on a book, so he has 0.4(0.8x + $50) = 0.32x + $20 remaining.
Since the cost of the book is 0.8x + $90, we can set up the equation: 0.32x + $20 = 0.8x + $90.
Subtracting 0.32x and $20 from both sides of the equation, we get: $20 = 0.48x + $90.
Subtracting $90 from both sides of the equation, we get: -$70 = 0.48x.
Dividing both sides of the equation by 0.48, we get: x = -$70 / 0.48 = -$145.83.
Since the amount of money can't be negative, option 4 is invalid.
Therefore, Tim had $100 at first, which is option 1.

Let's work through the problem step by step:

Let's assume the amount of money Tim had at first is X dollars.

According to the problem:
- He spent 20% of his money on a shirt, which means he spent 0.2X dollars on the shirt.
- After that, he received $50 from his mother. So his balance became X + 50 dollars.
- He then spent 60% of what he had then on a book, which means he spent 0.6 * (X + 50) dollars on the book.
- The cost of the book was $40 more than the money his mother gave him. So, the cost of the book was (X + 50) + $40 = X + 90 dollars.

So, the equation becomes:
0.2X + 0.6 * (X + 50) = X + 90

Let's solve this equation:

0.2X + 0.6X + 30 = X + 90
0.8X + 30 = X + 90
0.8X - X = 90 - 30
0.2X = 60
X = 60 / 0.2
X = 300

Therefore, Tim had $300 at first.

So, the correct answer is:
(4) $175