No, retained profits are not part of working capital. They are separate from each other. Retained profits include profits made by a business in previous financial periods, which are retained by the business to be used in the future instead of distributing them as dividends to shareholders. On the other hand, working capital refers to the funds available for the short-term financial commitments of a business.
Net working capital is determined by subtracting current liabilities from current assets, and the working capital (i.e. current) ratio is calculated by dividing current assets by current liabilities.
Additionally, consider the following balance sheet:
If you closely observe this balance sheet, you will notice that there is no particular category for working capital, although you can still interpret it using the values for current assets and current liabilities, which are the main elements to be considered (as I already established). On the other hand, retained profits are included under owner's equity, making them separate from working capital.
I hope this helps!