How do I assign a user an access level?

On our site we have two types of members. First are parent users. Parents register on the website, pay for subscriptions, and renew.

A parent can create up to 5 child users. These users are for whoever they want to give access to the content under their subscription.

We are handling all the user creation aspects, but the one addition that we need to make is when a parent user creates a child user, we need to look up the parent user’s current access level and assign it to their new child user.

Also, when the parent’s drip content subscription is renewed, we need to pass that new level to all of their children so that everyone receives access to the new content.

I have looked through the code, and couldn’t really find exactly what I was looking for. Can you provide some examples or point out a function that I may be able to utilize?