5 bucks gets taxed, you invest it in a local lemonade stand, you make 10 bucks. You now get taxed again on the additional 5 dollars NOT the full 10.
Actually in your example, you skipped a step. You invest $5 in a lemonade stand and sold $10 worth of product.
You skipped the part where the the government taxes the lemonade stand, the business itself, $2, so now you have $8.
Given your $5 investment, you now you made $3, not $5. Government then taxes the $3 as a capital gain.
And that ignores the payroll taxes for the person who operated the stand, the business taxes for their assets (stand, lemonade jar), sales taxes collected on the lemonade sales, ...