Right, I understand now. You are wanting to give a role (let's call the role "manager") the ability to edit roles/permissions and add new roles/permissions.
First thing to know is that in doing this you would be going well off the map of what is documented in ProcessWire and straying into some potentially dangerous territory. Normally only superusers manage roles and permissions, and if you decide to deviate from that you'll want to do your own thorough testing. It sounds risky to me and not something to be done lightly.
But I took a look at what's needed to enable this and it seems that the steps are...
Manage roles
1. Create new permission "role-admin".
2. Give this permission to the manager role.
3. Open the "role" template at Setup > Templates (you'll need to show system templates in the filter section). On the Access tab allow the manager role to "Edit Pages" and "Add Pages".
4. Open the "admin" template, and on the Access tab allow the manager role to "Add Children".
Manage permissions
1. Create new permission "permission-admin".
2. Give this permission to the manager role.
3. Open the "permission" template at Setup > Templates (you'll need to show system templates in the filter section). On the Access tab allow the manager role to "Edit Pages" and "Add Pages".
4. Open the "admin" template, and on the Access tab allow the manager role to "Add Children". You can skip this step if you already did it.