"Is the amount that was paid a cost of Sale, or a distribution of dividend?"
There is never Dividend for S corp and this is not a Cost of Sales.
And it matters if this is Entity sale, or Assets/Liability, or only that one "old member" is selling? And his Basis, compared to "X" amount? Who is this sold to; another shareholder?
Have you worked on business sales in the past, or is this your first?
"Level Up" is a gaming function, not a real life function.