Investors & landlords

I read through the example & reply above but still have questions. Here is my example:

I am a limited partner in a real estate LLC. The deal closed out in 2022 sending a final K-1.

Part III line 19 had a distribution of $50,650. 

Part II, K has an ending capital account of -2582.

Part III, #2 has -5648 as income.

Part III #10 shows 1231 gain as $32,650.

Is my cost basis: -2582 -5648 + 32650 = 24,442?

What do I do with #9c, 1250 gain of $4724?