How to align one element in a container different from the rest?

I have a container (black square) with 3 green elements that are aligned in the center using auto layout.

Now I want to add a red element in that same container but aligned to the right.

Having a hard time achieving this, can somebody help point me in the right direction?

How can I achieve a result like in the image I attached:

Did you find out how? I want to do the same thing!

Make the black square into an auto-layout frame and set its Horizontal Gap Between Items to Auto and orientation to horizontal.
image

Wrap the three green elements in an auto-layout frame and set its Horizontal Resizing to Fill and the auto-layout alignment to Center.
image

Now place the red element inside the black square auto-layout frame, to the right of the green element’s auto layout frame.

image