I'll give you a question, please answer with step-by-step reasoning process.
Tom buys 20 shares of a stock that costs $3 each. He sells 10 of those shares for $4 each. The rest of the shares end up doubling in value. How much profit does he make?

40
He spends 3 * 20 = $60 on the shares.

He sells 10 for 10 * 4 = $40.

He sells the other 20 - 10 = 10 for a higher valuation.

Their price was 3 * 2 = $6.

So he got 10 * 6 = $60 from those.

So in total, he got 60 + 40 = $100.

So his profit was 100 - 60 = $40.

.

Final answer: 40