Depends on two things: (1) why the cash back was distributed and (2) the taxable proceeds.
For example, I just sold a house where I got cash back. BUT this was tied to expenses I had in getting the property ready for sale and then selling it. That would be a reimbursement and those are not taxable because you are getting back money you spent on the sale.
However, on a previous house, I got a larger amount back in terms of equity growth converted to cash. I was taxed on all proceeds greater than the pruchase price, even though I didn’t get the cash myself. The rest of the cash was taxed at two long term cap gains rates: (1) tax rate for depreciable assets - the building - 25% and (2) tax rate for non depreciable assets - namely the land - 15%. This is because I held the property over 12 months.
If I held the property less than 12 months, it would be taxed at my normal income tax rate.
If it was my primary residence I would not pay tax on the first 250k (single) or 500k (married).
I’m not a CPA, but mine spent a lot of time explaining the gyrations required by the tax code to try and minimize my tax hit. The worst was explaining how the tax deferred through a 1031 exchange was determined when one of the downstream properties was eventually sold.