Total equity of the company is the amount of invested plus the income generated during the year. If any dividend is paid during the year, the amount of dividend is subtracted before arriving at the ending shareholders’ equity.
Ending shareholders’ equity = Amount invested + Net Income – Dividend
= $15000 + ($35000- $23000) - $2000
= $27000
Therefore, shareholders’ equity balance would be $27,000.