This example uses: justify-content: space-between to spread the two flex items to the left and right margins.
.flex-container {
display: flex;
justify-content: space-between;
background-color: indianred;
}
.flex-container > div {
background-color: powderblue;
margin: 10px;
padding: 20px;
font-size: 30px;
}
<div class="flex-container">
<div>1</div>
<div>2</div>
<div>3</div>
</div>