10K carryover capital loss.
5K capital gain in 2022
10K-5K, you ahve 5K left over capital loss in 2022.
You can use 3K of that 5K capital loss against your gross income.
So you have 10K - 5K (2022 gain) - 3K (income duduction) = 2K for carryover to 2023.