I can't tell what sizes your green squares are, whether they're supposed to all be the same width, or whether those green center squares are perfectly centered, but this is one way.
.container {
display: flex;
background: pink;
justify-content: center;
}
.container > div {
background: green;
height: 50px;
display: block;
border-left: 1px solid #e2e2e2;
width: 20%;
}
.container > div:nth-child(1),
.container > div:nth-child(3) {
margin-left: 20%;
}
<div class="container">
<div></div>
<div></div>
<div></div>
</div>
If you wanted to have the green boxes dead center, and the end green box floating to the right, you could use position: absolute;
which may do what you want it to (I know you wanted to use flexbox though).
.container {
display: flex;
background: #e2e2e2;
justify-content: center;
}
.container > div {
background: green;
height: 50px;
display: block;
border: 1px solid #e2e2e2;
width: 20%;
}
.container > div:nth-child(3) {
position: absolute;
right: 0;
width: 10%;
}
<div class="container">
<div></div>
<div></div>
<div></div>
</div>